Skip to content
This repository was archived by the owner on Jul 28, 2021. It is now read-only.

Commit ac3a740

Browse files
committed
Idle connections fix
1 parent 8901390 commit ac3a740

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

protdial.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,15 @@ func pipeBothIOsAndClose(parentctx context.Context, a io.ReadWriteCloser, b io.R
223223
wg.Done()
224224
if err != nil {
225225
onErrFn(fmt.Errorf("pipeBothIOsAndClose b<-a: %s", err))
226+
cancel()
226227
}
227228
}()
228229
go func() {
229230
_, err := io.Copy(a, b)
230231
wg.Done()
231232
if err != nil {
232233
onErrFn(fmt.Errorf("pipeBothIOsAndClose a<-b: %s", err))
234+
cancel()
233235
}
234236
}()
235237

0 commit comments

Comments
 (0)