0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

Try to fix infinite conn read in tests

This commit is contained in:
yuhan6665
2024-07-01 22:28:50 -04:00
parent c6a57b2cc1
commit 60b2c349d2
3 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,7 @@ func Test_listenWSAndDial(t *testing.T) {
defer c.Close()
var b [1024]byte
c.SetReadDeadline(time.Now().Add(2 * time.Second))
_, err := c.Read(b[:])
if err != nil {
return