{"action":"created","issue":{"url":"https://api.github.com/repos/NanoHttpd/nanohttpd/issues/212","labels_url":"https://api.github.com/repos/NanoHttpd/nanohttpd/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/NanoHttpd/nanohttpd/issues/212/comments","events_url":"https://api.github.com/repos/NanoHttpd/nanohttpd/issues/212/events","html_url":"https://github.com/NanoHttpd/nanohttpd/pull/212","id":96052791,"number":212,"title":"Option to start main server thread as non-daemon","user":{"login":"Chris54721","id":3685659,"avatar_url":"https://avatars.githubusercontent.com/u/3685659?v=3","gravatar_id":"","url":"https://api.github.com/users/Chris54721","html_url":"https://github.com/Chris54721","followers_url":"https://api.github.com/users/Chris54721/followers","following_url":"https://api.github.com/users/Chris54721/following{/other_user}","gists_url":"https://api.github.com/users/Chris54721/gists{/gist_id}","starred_url":"https://api.github.com/users/Chris54721/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chris54721/subscriptions","organizations_url":"https://api.github.com/users/Chris54721/orgs","repos_url":"https://api.github.com/users/Chris54721/repos","events_url":"https://api.github.com/users/Chris54721/events{/privacy}","received_events_url":"https://api.github.com/users/Chris54721/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-20T12:23:57Z","updated_at":"2015-08-08T07:05:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NanoHttpd/nanohttpd/pulls/212","html_url":"https://github.com/NanoHttpd/nanohttpd/pull/212","diff_url":"https://github.com/NanoHttpd/nanohttpd/pull/212.diff","patch_url":"https://github.com/NanoHttpd/nanohttpd/pull/212.patch"},"body":"I'm working on a Java app based on an HTTP server that accepts requests and performs operations accordingly. As the `NanoHttpd Main Listener` thread is the only thread that keeps running, I need an option to make sure it is not started as a daemon thread.\r\nThis PR makes sure you can change this by running `setMainThreadDaemon(boolean flag)` while the main thread is stopped."},"comment":{"url":"https://api.github.com/repos/NanoHttpd/nanohttpd/issues/comments/128925538","html_url":"https://github.com/NanoHttpd/nanohttpd/pull/212#issuecomment-128925538","issue_url":"https://api.github.com/repos/NanoHttpd/nanohttpd/issues/212","id":128925538,"user":{"login":"elonen","id":2125766,"avatar_url":"https://avatars.githubusercontent.com/u/2125766?v=3","gravatar_id":"","url":"https://api.github.com/users/elonen","html_url":"https://github.com/elonen","followers_url":"https://api.github.com/users/elonen/followers","following_url":"https://api.github.com/users/elonen/following{/other_user}","gists_url":"https://api.github.com/users/elonen/gists{/gist_id}","starred_url":"https://api.github.com/users/elonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elonen/subscriptions","organizations_url":"https://api.github.com/users/elonen/orgs","repos_url":"https://api.github.com/users/elonen/repos","events_url":"https://api.github.com/users/elonen/events{/privacy}","received_events_url":"https://api.github.com/users/elonen/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T07:05:43Z","updated_at":"2015-08-08T07:05:43Z","body":"Would adding a bool to the start function, e.g. `public void start(final int timeout, boolean main_thread_daemon=true)`, suffice in your case?"}}