diff --git a/common/turbotunnel/queuepacketconn_test.go b/common/turbotunnel/queuepacketconn_test.go index 30e69e3..312e665 100644 --- a/common/turbotunnel/queuepacketconn_test.go +++ b/common/turbotunnel/queuepacketconn_test.go @@ -214,7 +214,8 @@ func TestQueuePacketConnWriteToKCP(t *testing.T) { } // A sleep after the Write makes buffer reuse more likely. - time.Sleep(100 * time.Millisecond) + // We need to sleep to allow the connection to flush after close + time.Sleep(1 * time.Second) if len(transcript.Transcript) == 0 { panic("empty transcript")