Skip to content

Commit c9e1521

Browse files
Catching new destroyed event and calling error
1 parent f1e7707 commit c9e1521

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

libs/ofxLibwebsockets/include/ofxLibwebsockets/Util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ namespace ofxLibwebsockets {
5959
case LWS_CALLBACK_CONFIRM_EXTENSION_OKAY:
6060
case LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED:
6161
case LWS_CALLBACK_PROTOCOL_INIT:
62+
case LWS_CALLBACK_WSI_CREATE:
6263
return 0;
6364

6465
case LWS_CALLBACK_FILTER_NETWORK_CONNECTION:
@@ -82,6 +83,7 @@ namespace ofxLibwebsockets {
8283
case LWS_CALLBACK_UNLOCK_POLL:
8384
case LWS_CALLBACK_GET_THREAD_ID:
8485
case LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH:
86+
case LWS_CALLBACK_CLIENT_APPEND_HANDSHAKE_HEADER:
8587
return 1;
8688

8789
default:

libs/ofxLibwebsockets/src/Reactor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ namespace ofxLibwebsockets {
123123
switch (reason) {
124124
// connection was not successful
125125
case LWS_CALLBACK_CLIENT_CONNECTION_ERROR:
126+
case LWS_CALLBACK_WSI_DESTROY:
126127
ofLogError()<<"[ofxLibwebsockets] Connection error";
127128
//TODO: add error event!
128129

libs/ofxLibwebsockets/src/Server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace ofxLibwebsockets {
118118
ofLogError() << "[ofxLibwebsockets] libwebsockets init failed";
119119
return false;
120120
} else {
121-
startThread(true, false); // blocking, non-verbose
121+
startThread(); // blocking, non-verbose
122122
return true;
123123
}
124124
}

0 commit comments

Comments
 (0)