Added additional time to wait for connection close from server

This commit is contained in:
Derek Collison
2013-06-01 14:33:47 -07:00
parent cc97e0c660
commit 7c093f48a8

View File

@@ -44,8 +44,10 @@ func TestPingInterval(t *testing.T) {
expect(errRe)
// Server should close the connection at this point..
var err error
time.Sleep(PING_INTERVAL)
c.SetWriteDeadline(time.Now().Add(PING_INTERVAL))
var err error
for {
_, err = c.Write([]byte("PING\r\n"))
if err != nil {