1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-18 07:17:32 -05:00

close server down link

This commit is contained in:
Darien Raymond 2017-04-04 11:20:07 +02:00
parent 619c7b9e39
commit 7195c17af6
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -321,11 +321,11 @@ func (w *ServerWorker) remove(id uint16) {
func handle(ctx context.Context, s *session, output buf.Writer) { func handle(ctx context.Context, s *session, output buf.Writer) {
writer := NewResponseWriter(s.id, output) writer := NewResponseWriter(s.id, output)
defer writer.Close()
if err := buf.PipeUntilEOF(signal.BackgroundTimer(), s.input, writer); err != nil { if err := buf.PipeUntilEOF(signal.BackgroundTimer(), s.input, writer); err != nil {
log.Info("Proxyman|Mux|ServerWorker: Session ", s.id, " ends: ", err) log.Info("Proxyman|Mux|ServerWorker: Session ", s.id, " ends: ", err)
} }
writer.Close()
s.closeDownlink()
} }
func (w *ServerWorker) run(ctx context.Context) { func (w *ServerWorker) run(ctx context.Context) {