Idle connections fix

This commit is contained in:
nickname32
2020-08-31 17:05:05 +03:00
parent 89013905fe
commit ac3a740f23

View File

@@ -223,6 +223,7 @@ func pipeBothIOsAndClose(parentctx context.Context, a io.ReadWriteCloser, b io.R
wg.Done() wg.Done()
if err != nil { if err != nil {
onErrFn(fmt.Errorf("pipeBothIOsAndClose b<-a: %s", err)) onErrFn(fmt.Errorf("pipeBothIOsAndClose b<-a: %s", err))
cancel()
} }
}() }()
go func() { go func() {
@@ -230,6 +231,7 @@ func pipeBothIOsAndClose(parentctx context.Context, a io.ReadWriteCloser, b io.R
wg.Done() wg.Done()
if err != nil { if err != nil {
onErrFn(fmt.Errorf("pipeBothIOsAndClose a<-b: %s", err)) onErrFn(fmt.Errorf("pipeBothIOsAndClose a<-b: %s", err))
cancel()
} }
}() }()