mirror of
https://github.com/nickname76/p2p-forwarder.git
synced 2025-09-26 19:51:18 +08:00
Idle connections fix
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user