{"action":"created","issue":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/382","labels_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/382/labels{/name}","comments_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/382/comments","events_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/382/events","html_url":"https://github.com/warmcat/libwebsockets/issues/382","id":123762797,"number":382,"title":"The websocket connection stopped working after upgrading to 1.6","user":{"login":"012345678987654321","id":16422390,"avatar_url":"https://avatars.githubusercontent.com/u/16422390?v=3","gravatar_id":"","url":"https://api.github.com/users/012345678987654321","html_url":"https://github.com/012345678987654321","followers_url":"https://api.github.com/users/012345678987654321/followers","following_url":"https://api.github.com/users/012345678987654321/following{/other_user}","gists_url":"https://api.github.com/users/012345678987654321/gists{/gist_id}","starred_url":"https://api.github.com/users/012345678987654321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/012345678987654321/subscriptions","organizations_url":"https://api.github.com/users/012345678987654321/orgs","repos_url":"https://api.github.com/users/012345678987654321/repos","events_url":"https://api.github.com/users/012345678987654321/events{/privacy}","received_events_url":"https://api.github.com/users/012345678987654321/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-24T06:09:09Z","updated_at":"2015-12-25T00:55:37Z","closed_at":"2015-12-24T14:25:34Z","body":"Hi!\r\n\r\nI have upgraded my software to libwebsockets 1.6.0 like in the changelog described, but now the websocket connection stopped to work. My callback is called only once, with \"LWS_CALLBACK_PROTOCOL_INIT\" as reason and that's all. I don't get any error, neither on the server side nor  on the client side. My protocols are defined as follow:\r\n\r\n\tstruct lws_protocols protocols[3] =\r\n\t{\r\n\t    /* first protocol must always be HTTP handler */\r\n\t    {\r\n\t        \"http-only\",\r\n\t        callback_http,\r\n\t        sizeof(per_session_data),\r\n\t        0\r\n\t    },\r\n\t    {\r\n\t        \"websocket\",\r\n\t        callback_ws,\r\n\t        sizeof(per_session_data),\r\n\t        0\r\n\t    },\r\n\t    {\r\n\t        NULL, NULL, 0, 0  /* End of list */\r\n\t    }\r\n\t};\r\n\r\nAnd later the thread:\r\n\r\n\t// Context creation info\r\n\tstruct lws_context_creation_info info;\r\n\r\n\t// Context creation info setup\r\n\tmemset(&info, 0, sizeof info);\r\n\tinfo.port = __CONFIG_SERVER_PORT__;\r\n\tinfo.iface = NULL;\r\n\tinfo.protocols = protocols;\r\n\tinfo.extensions = NULL;\r\n\tinfo.ssl_cert_filepath = NULL;\r\n\tinfo.ssl_private_key_filepath = NULL;\r\n\tinfo.gid = -1;\r\n\tinfo.uid = -1;\r\n\tinfo.options = 0;\r\n\tinfo.ka_time = 0;\r\n\r\n\t// Create context\r\n\tstruct lws_context *context = lws_create_context(&info);\r\n\tif(!context) return NULL;\r\n\r\n        while(server_is_running) {\r\n                lws_service(context, 10);\r\n        }\r\n\r\n        // Destroy\r\n\tlws_context_destroy(context);\r\n\r\nDo you have any idea what can cause the problem!? Thank you :)"},"comment":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/comments/167173506","html_url":"https://github.com/warmcat/libwebsockets/issues/382#issuecomment-167173506","issue_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/382","id":167173506,"user":{"login":"lws-team","id":15154525,"avatar_url":"https://avatars.githubusercontent.com/u/15154525?v=3","gravatar_id":"","url":"https://api.github.com/users/lws-team","html_url":"https://github.com/lws-team","followers_url":"https://api.github.com/users/lws-team/followers","following_url":"https://api.github.com/users/lws-team/following{/other_user}","gists_url":"https://api.github.com/users/lws-team/gists{/gist_id}","starred_url":"https://api.github.com/users/lws-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lws-team/subscriptions","organizations_url":"https://api.github.com/users/lws-team/orgs","repos_url":"https://api.github.com/users/lws-team/repos","events_url":"https://api.github.com/users/lws-team/events{/privacy}","received_events_url":"https://api.github.com/users/lws-team/received_events","type":"User","site_admin":false},"created_at":"2015-12-25T00:55:37Z","updated_at":"2015-12-25T00:55:37Z","body":"Glad you're working again.\r\n\r\nFWIW I checked the echo test app by giving it a protocol name of \"\" and even NULL and it could still work in both server and client modes."}}