Skip to content

Commit

Permalink
add reconnect interval
Browse files Browse the repository at this point in the history
  • Loading branch information
name5566 committed May 24, 2016
1 parent a3f82e4 commit 32c1f12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions network/tcp_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ reconnect:
agent.OnClose()

if client.AutoReconnect {
time.Sleep(client.ConnectInterval)
goto reconnect
}
}
Expand Down
1 change: 1 addition & 0 deletions network/ws_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ reconnect:
agent.OnClose()

if client.AutoReconnect {
time.Sleep(client.ConnectInterval)
goto reconnect
}
}
Expand Down

0 comments on commit 32c1f12

Please sign in to comment.