{"action":"created","issue":{"url":"https://api.github.com/repos/Alignak-monitoring/alignak/issues/147","labels_url":"https://api.github.com/repos/Alignak-monitoring/alignak/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/Alignak-monitoring/alignak/issues/147/comments","events_url":"https://api.github.com/repos/Alignak-monitoring/alignak/issues/147/events","html_url":"https://github.com/Alignak-monitoring/alignak/pull/147","id":97166578,"number":147,"title":"Fix clean stop bottle of daemons when press CTRL+C","user":{"login":"ddurieux","id":239744,"avatar_url":"https://avatars.githubusercontent.com/u/239744?v=3","gravatar_id":"","url":"https://api.github.com/users/ddurieux","html_url":"https://github.com/ddurieux","followers_url":"https://api.github.com/users/ddurieux/followers","following_url":"https://api.github.com/users/ddurieux/following{/other_user}","gists_url":"https://api.github.com/users/ddurieux/gists{/gist_id}","starred_url":"https://api.github.com/users/ddurieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddurieux/subscriptions","organizations_url":"https://api.github.com/users/ddurieux/orgs","repos_url":"https://api.github.com/users/ddurieux/repos","events_url":"https://api.github.com/users/ddurieux/events{/privacy}","received_events_url":"https://api.github.com/users/ddurieux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T23:13:59Z","updated_at":"2015-08-24T15:06:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Alignak-monitoring/alignak/pulls/147","html_url":"https://github.com/Alignak-monitoring/alignak/pull/147","diff_url":"https://github.com/Alignak-monitoring/alignak/pull/147.diff","patch_url":"https://github.com/Alignak-monitoring/alignak/pull/147.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/Alignak-monitoring/alignak/issues/comments/134237999","html_url":"https://github.com/Alignak-monitoring/alignak/pull/147#issuecomment-134237999","issue_url":"https://api.github.com/repos/Alignak-monitoring/alignak/issues/147","id":134237999,"user":{"login":"gst","id":38055,"avatar_url":"https://avatars.githubusercontent.com/u/38055?v=3","gravatar_id":"","url":"https://api.github.com/users/gst","html_url":"https://github.com/gst","followers_url":"https://api.github.com/users/gst/followers","following_url":"https://api.github.com/users/gst/following{/other_user}","gists_url":"https://api.github.com/users/gst/gists{/gist_id}","starred_url":"https://api.github.com/users/gst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gst/subscriptions","organizations_url":"https://api.github.com/users/gst/orgs","repos_url":"https://api.github.com/users/gst/repos","events_url":"https://api.github.com/users/gst/events{/privacy}","received_events_url":"https://api.github.com/users/gst/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T15:06:24Z","updated_at":"2015-08-24T15:06:24Z","body":"Please update to this form : \r\n\r\n```\r\nend = time.time() + 15    # say give 15 seconds to wait all of them\r\nlogger.info(\"Joining my http client threads ..\")\r\nwhile time.time() < end: \r\n    for t in tuple(self.threads):\r\n        if not t.is_alive():\r\n            t.join()\r\n            self.threads.remove(t)\r\n        if not self.threads:\r\n            break\r\n        time.sleep(1)\r\nif self.threads:\r\n    logger.warning(\"Some (%s) http threads remain alive: %s\", len(self.threads), self.threads)\r\n```\r\n\r\notherwise you are doing a wait up to 5 seconds on each thread, if there had 10 of them and each would be \"blocked\" then this would delay the stop of 50 seconds..\r\n"}}