{"action":"created","issue":{"url":"https://api.github.com/repos/bel2125/civetweb/issues/58","labels_url":"https://api.github.com/repos/bel2125/civetweb/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/bel2125/civetweb/issues/58/comments","events_url":"https://api.github.com/repos/bel2125/civetweb/issues/58/events","html_url":"https://github.com/bel2125/civetweb/issues/58","id":53498328,"number":58,"title":"Crash when listening several ports","user":{"login":"etrinh","id":4454763,"avatar_url":"https://avatars.githubusercontent.com/u/4454763?v=3","gravatar_id":"","url":"https://api.github.com/users/etrinh","html_url":"https://github.com/etrinh","followers_url":"https://api.github.com/users/etrinh/followers","following_url":"https://api.github.com/users/etrinh/following{/other_user}","gists_url":"https://api.github.com/users/etrinh/gists{/gist_id}","starred_url":"https://api.github.com/users/etrinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etrinh/subscriptions","organizations_url":"https://api.github.com/users/etrinh/orgs","repos_url":"https://api.github.com/users/etrinh/repos","events_url":"https://api.github.com/users/etrinh/events{/privacy}","received_events_url":"https://api.github.com/users/etrinh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-01-06T09:52:15Z","updated_at":"2015-01-08T14:40:57Z","closed_at":null,"body":"Hi,\r\n\r\nWhen I listen to several ports, for example: \"443s, 80r\", but port 80 is already used, civetweb crash during ssl_locking_callback due to an invalid mutex.\r\n\r\nBest Regards,\r\nEric"},"comment":{"url":"https://api.github.com/repos/bel2125/civetweb/issues/comments/69187461","html_url":"https://github.com/bel2125/civetweb/issues/58#issuecomment-69187461","issue_url":"https://api.github.com/repos/bel2125/civetweb/issues/58","id":69187461,"user":{"login":"wiseoldman95","id":5030488,"avatar_url":"https://avatars.githubusercontent.com/u/5030488?v=3","gravatar_id":"","url":"https://api.github.com/users/wiseoldman95","html_url":"https://github.com/wiseoldman95","followers_url":"https://api.github.com/users/wiseoldman95/followers","following_url":"https://api.github.com/users/wiseoldman95/following{/other_user}","gists_url":"https://api.github.com/users/wiseoldman95/gists{/gist_id}","starred_url":"https://api.github.com/users/wiseoldman95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiseoldman95/subscriptions","organizations_url":"https://api.github.com/users/wiseoldman95/orgs","repos_url":"https://api.github.com/users/wiseoldman95/repos","events_url":"https://api.github.com/users/wiseoldman95/events{/privacy}","received_events_url":"https://api.github.com/users/wiseoldman95/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T14:40:57Z","updated_at":"2015-01-08T14:40:57Z","body":"Thanks! That resolved it.\r\n```\r\nint main(void)\r\n{\r\n\tstruct mg_context *ctx;\r\n\tstruct mg_callbacks callbacks;\r\n\tconst char *options[] = {\"listening_ports\", PORT, NULL};\r\n\tmemset(&callbacks, 0, sizeof(callbacks));\r\n\tctx = mg_start(&callbacks, NULL, options);\r\n\tif (ctx==NULL)\r\n\t{\r\n\t\tprintf(\"Server FAILED to run on port %s!\\n\",PORT);\r\n\t\treturn -1;\r\n\t}\r\n\tprintf(\"Server is running on port %s!\\n\",PORT);\r\n\t\r\n\tmg_set_request_handler(ctx,\"/hello\", helloWorld,0);\r\n\tgetchar();\r\n\tmg_stop(ctx);\r\n    return 0;\r\n}\r\n```"}}