clientisHost = false;
//isWrite = false;
//buflen = 0;
- was_closed = 1;
+ was_closed = true;
wsi_mirror = NULL;
Context = NULL;
mirror_lifetime = 0;
clientisHost = false;
//isWrite = false;
//buflen = 0;
- was_closed = 1;
+ was_closed = true;
wsi_mirror = NULL;
Context = NULL;
mirror_lifetime = 0;
connectionHandler->stopPing();
- was_closed = 1;
+ was_closed = true;
lws_callback_on_writable(wsi_mirror);
disconnecting = false;
connectionHandler->stopPing();
wsi_mirror = NULL;
connected = false;
- was_closed = 1;
+ was_closed = true;
+ if ( Context )
+ lws_cancel_service(Context);
+
if (disconnecting)
disconnecting = false;
callbacks.clear();
this_ptr->handleWsiDestroy();
break;
+ case LWS_CALLBACK_GET_THREAD_ID:
+ return pthread_self();
+
case LWS_CALLBACK_CLIENT_CONFIRM_EXTENSION_SUPPORTED:
case LWS_CALLBACK_ADD_POLL_FD:
case LWS_CALLBACK_DEL_POLL_FD:
map<string, string> *attributes = (map<string, string> *)(att);
string uri = getChannelUri(attributes);
- was_closed = 0;
+ was_closed = false;
//struct lws_context *context;
int ietf_version = -1; /* latest */
}
}
- n = lws_service(Context, 1500);
+ n = lws_service(Context, 0x0FFFFFFF);
if (n < 0)
break;
{
if (!isCommunicated) {
was_closed = true;
+ if ( Context )
+ lws_cancel_service(Context);
+
MSF_ERR("wsi destroyed with no communication");
if (onErrorListener) {
onErrorListener->onError();