mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Add tests for read/write from/to closed connection
Add tests for read/write from/to closed connection
This commit is contained in:
committed by
Steffen Vogel
parent
d99a6fcb7c
commit
049d579705
@@ -83,6 +83,14 @@ func TestMuxAgent(t *testing.T) {
|
||||
require.NoError(t, conn.Close())
|
||||
require.NoError(t, muxedConn.Close())
|
||||
require.NoError(t, udpMux.Close())
|
||||
|
||||
// expect error when reading from closed mux
|
||||
_, err = muxedConn.Read(data)
|
||||
require.Error(t, err)
|
||||
|
||||
// expect error when writing to closed mux
|
||||
_, err = muxedConn.Write(data)
|
||||
require.Error(t, err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user