code style fix

This commit is contained in:
Links
2021-01-05 21:15:09 +01:00
parent 1b4f186fa6
commit 822618f606
2 changed files with 28 additions and 31 deletions

View File

@@ -71,13 +71,12 @@ WebSocketsServer::~WebSocketsServer() {
* called to initialize the Websocket server
*/
void WebSocketsServerCore::begin(void) {
// adjust clients storage:
// _clients[i]'s constructor are already called,
// all its members are initialized to their default value,
// except the ones explicitly detailed in WSclient_t() constructor.
// Then we need to initialize some members to non-trivial values:
for (int i = 0; i < WEBSOCKETS_SERVER_CLIENT_MAX; i++) {
for(int i = 0; i < WEBSOCKETS_SERVER_CLIENT_MAX; i++) {
_clients[i].init(i, _pingInterval, _pongTimeout, _disconnectTimeoutCount);
}
@@ -100,7 +99,7 @@ void WebSocketsServerCore::close(void) {
// restore _clients[] to their initial state
// before next call to ::begin()
for (int i = 0; i < WEBSOCKETS_SERVER_CLIENT_MAX; i++) {
for(int i = 0; i < WEBSOCKETS_SERVER_CLIENT_MAX; i++) {
_clients[i] = WSclient_t();
}
}