8000 Merge pull request #521 from amrbekhit/patch-1 · DerialE/arduinoWebSockets@ac9b2cc · GitHub
[go: up one dir, main page]

Skip to content

Commit ac9b2cc

Browse files
authored
Merge pull request Links2004#521 from amrbekhit/patch-1
Initialize _reconnectInterval in constructor.
2 parents 420cc55 + 1268458 commit ac9b2cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebSocketsClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ WebSocketsClient::WebSocketsClient() {
3030
_client.num = 0;
3131
_client.cIsClient = true;
3232
_client.extraHeaders = WEBSOCKETS_STRING("Origin: file://");
33+
_reconnectInterval = 500;
3334
}
3435

3536
WebSocketsClient::~WebSocketsClient() {
@@ -82,7 +83,6 @@ void WebSocketsClient::begin(const char * host, uint16_t port, const char * url,
8283
#endif
8384

8485
_lastConnectionFail = 0;
85-
_reconnectInterval = 500;
8686
}
8787

8888
void WebSocketsClient::begin(String host, uint16_t port, String url, String protocol) {

0 commit comments

Comments
 (0)
0