Respect context deadlines

This commit is contained in:
Jeromy
2016-08-17 11:35:25 -07:00
committed by Jakub Sztandera
parent 715d488a8f
commit 464e01657e
2 changed files with 14 additions and 0 deletions

View File

@@ -454,6 +454,10 @@ func TestPacketListenDialSamePort(t *testing.T) {
t.Fatal(err)
}
if err := c1.SetReadDeadline(time.Now().Add(time.Second * 2)); err != nil {
t.Fatal(err)
}
if _, err := c1.Read(hello2); err != nil {
t.Fatal(err)
}