diff --git a/Transfer UDT.go b/Transfer UDT.go index ea8f827..389186b 100644 --- a/Transfer UDT.go +++ b/Transfer UDT.go @@ -18,7 +18,7 @@ import ( ) // transferSequenceTimeout is the timeout for a follow-up message to appear, otherwise the transfer will be terminated. -var transferSequenceTimeout = time.Minute * 10 +var transferSequenceTimeout = time.Minute * 1 // maxFlowWinSize is the maximum number of unacknowledged packets to permit. A higher number means using more memory, but reduces potential overhead since it does not stop so quickly for missing packets. // Each unacknowledged packet may store protocol.TransferMaxEmbedSize (currently 1121 bytes) payload data in memory. A too high number may impact the speed of real-time streaming in case of lost packets. diff --git a/udt/multiplexer.go b/udt/multiplexer.go index 694a359..3299f85 100644 --- a/udt/multiplexer.go +++ b/udt/multiplexer.go @@ -49,6 +49,7 @@ func (m *multiplexer) goRead() { select { case buf = <-m.incomingData: case <-m.terminationSignal: + m.socket.Close() // Pass the external termination signal down to the socket. This makes sure any pending reader on the socket (especially if blocking) returns with EOF. return }