Wait up to 1 second to connect

This commit is contained in:
Derek Collison
2012-11-20 14:53:49 -08:00
parent 79457457a2
commit 0c96bc51e3

View File

@@ -62,7 +62,7 @@ func (s *natsServer) stopServer() {
func createClientConn(t tLogger, host string, port int) net.Conn {
addr := fmt.Sprintf("%s:%d", host, port)
c, err := net.DialTimeout("tcp", addr, 500*time.Millisecond)
c, err := net.DialTimeout("tcp", addr, 1*time.Second)
if err != nil {
t.Fatalf("Could not connect to server: %v\n", err)
}