{"action":"created","issue":{"url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/158","repository_url":"https://api.github.com/repos/alexhultman/uWebSockets","labels_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/158/comments","events_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/158/events","html_url":"https://github.com/alexhultman/uWebSockets/issues/158","id":161907379,"number":158,"title":"shutdown and restart server error","user":{"login":"joyousrabbit","id":17914784,"avatar_url":"https://avatars.githubusercontent.com/u/17914784?v=3","gravatar_id":"","url":"https://api.github.com/users/joyousrabbit","html_url":"https://github.com/joyousrabbit","followers_url":"https://api.github.com/users/joyousrabbit/followers","following_url":"https://api.github.com/users/joyousrabbit/following{/other_user}","gists_url":"https://api.github.com/users/joyousrabbit/gists{/gist_id}","starred_url":"https://api.github.com/users/joyousrabbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyousrabbit/subscriptions","organizations_url":"https://api.github.com/users/joyousrabbit/orgs","repos_url":"https://api.github.com/users/joyousrabbit/repos","events_url":"https://api.github.com/users/joyousrabbit/events{/privacy}","received_events_url":"https://api.github.com/users/joyousrabbit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-23T12:10:52Z","updated_at":"2016-06-23T18:49:24Z","closed_at":"2016-06-23T12:56:35Z","body":"Hello, uWebSoeckets is a great work and I use it in my project. I works very well.\r\n\r\nHowever, everytime I Ctrl+C to shutdown my program, then I re-execute my program, the server cannot get initialized and throw error:\r\n\r\nterminate called after throwing an instance of 'decltype(nullptr)'\r\nAborted\r\n\r\nI have to wait at least 30 seconds to re-start my program to keep avoid this error. Becasue I must restart the server often for my test, what a waste of time. Could you please kindly show me what's wrong? Thanks.\r\n\r\n./main \r\nterminate called after throwing an instance of 'decltype(nullptr)'\r\nAborted"},"comment":{"url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/comments/228147460","html_url":"https://github.com/alexhultman/uWebSockets/issues/158#issuecomment-228147460","issue_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/158","id":228147460,"user":{"login":"alexhultman","id":3397140,"avatar_url":"https://avatars.githubusercontent.com/u/3397140?v=3","gravatar_id":"","url":"https://api.github.com/users/alexhultman","html_url":"https://github.com/alexhultman","followers_url":"https://api.github.com/users/alexhultman/followers","following_url":"https://api.github.com/users/alexhultman/following{/other_user}","gists_url":"https://api.github.com/users/alexhultman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhultman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhultman/subscriptions","organizations_url":"https://api.github.com/users/alexhultman/orgs","repos_url":"https://api.github.com/users/alexhultman/repos","events_url":"https://api.github.com/users/alexhultman/events{/privacy}","received_events_url":"https://api.github.com/users/alexhultman/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T18:49:24Z","updated_at":"2016-06-23T18:49:24Z","body":"I can't see the whole code. You need to set master = false on any Server not being run on the main thread. That will make Server::close and Server::upgrade thread safe so that you can load balance connections. The internal instances are not thread safe though, so you cannot send data on a separate thread than the one the server is run on. Not currently at least, not without manually tinkering with the uv_async support."}}
{"actor":{"display_login":"alexhultman"}}