Skip to content

Commit b87bce4

Browse files
committed
add virtual to destructor #243
1 parent 9608c2d commit b87bce4

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

src/WebSockets.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ extern "C" {
4646

4747
#endif
4848

49+
4950
/**
5051
*
5152
* @param client WSclient_t * ptr to the client struct

src/WebSocketsClient.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ void WebSocketsClient::clientDisconnect(WSclient_t * client) {
373373
client->cCode = 0;
374374
client->cKey = "";
375375
client->cAccept = "";
376-
client->cProtocol = "";
377376
client->cVersion = 0;
378377
client->cIsUpgrade = false;
379378
client->cIsWebsocket = false;

src/WebSocketsClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class WebSocketsClient: private WebSockets {
3737

3838

3939
WebSocketsClient(void);
40-
~WebSocketsClient(void);
40+
virtual ~WebSocketsClient(void);
4141

4242
void begin(const char *host, uint16_t port, const char * url = "/", const char * protocol = "arduino");
4343
void begin(String host, uint16_t port, String url = "/", String protocol = "arduino");

src/WebSocketsServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class WebSocketsServer: protected WebSockets {
4444
#endif
4545

4646
WebSocketsServer(uint16_t port, String origin = "", String protocol = "arduino");
47-
~WebSocketsServer(void);
47+
virtual ~WebSocketsServer(void);
4848

4949
void begin(void);
5050

0 commit comments

Comments
 (0)