{"action":"closed","issue":{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/549","labels_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/549/comments","events_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/issues/549/events","html_url":"https://github.com/Bitmessage/PyBitmessage/issues/549","id":22206137,"number":549,"title":"Bitmessage does not shutdown correct in deamon mode","user":{"login":"merlink01","id":1200220,"avatar_url":"https://avatars.githubusercontent.com/u/1200220?v=3","gravatar_id":"","url":"https://api.github.com/users/merlink01","html_url":"https://github.com/merlink01","followers_url":"https://api.github.com/users/merlink01/followers","following_url":"https://api.github.com/users/merlink01/following{/other_user}","gists_url":"https://api.github.com/users/merlink01/gists{/gist_id}","starred_url":"https://api.github.com/users/merlink01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merlink01/subscriptions","organizations_url":"https://api.github.com/users/merlink01/orgs","repos_url":"https://api.github.com/users/merlink01/repos","events_url":"https://api.github.com/users/merlink01/events{/privacy}","received_events_url":"https://api.github.com/users/merlink01/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"PeterSurda","id":3815204,"avatar_url":"https://avatars.githubusercontent.com/u/3815204?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterSurda","html_url":"https://github.com/PeterSurda","followers_url":"https://api.github.com/users/PeterSurda/followers","following_url":"https://api.github.com/users/PeterSurda/following{/other_user}","gists_url":"https://api.github.com/users/PeterSurda/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterSurda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterSurda/subscriptions","organizations_url":"https://api.github.com/users/PeterSurda/orgs","repos_url":"https://api.github.com/users/PeterSurda/repos","events_url":"https://api.github.com/users/PeterSurda/events{/privacy}","received_events_url":"https://api.github.com/users/PeterSurda/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Bitmessage/PyBitmessage/milestones/2","html_url":"https://github.com/Bitmessage/PyBitmessage/milestones/v0.8.0","labels_url":"https://api.github.com/repos/Bitmessage/PyBitmessage/milestones/2/labels","id":1362167,"number":2,"title":"v0.8.0","description":"Stable release after 0.6","creator":{"login":"PeterSurda","id":3815204,"avatar_url":"https://avatars.githubusercontent.com/u/3815204?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterSurda","html_url":"https://github.com/PeterSurda","followers_url":"https://api.github.com/users/PeterSurda/followers","following_url":"https://api.github.com/users/PeterSurda/following{/other_user}","gists_url":"https://api.github.com/users/PeterSurda/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterSurda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterSurda/subscriptions","organizations_url":"https://api.github.com/users/PeterSurda/orgs","repos_url":"https://api.github.com/users/PeterSurda/repos","events_url":"https://api.github.com/users/PeterSurda/events{/privacy}","received_events_url":"https://api.github.com/users/PeterSurda/received_events","type":"User","site_admin":false},"open_issues":48,"closed_issues":5,"state":"open","created_at":"2015-10-18T09:05:51Z","updated_at":"2016-01-22T14:44:25Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2013-11-06T16:26:35Z","updated_at":"2016-01-22T14:44:25Z","closed_at":"2016-01-22T14:44:25Z","body":"    import os\r\n    #Here is a Testscript:\r\n\r\n\r\n    import time\r\n    import tempfile\r\n    import threading\r\n    import bitmessagemain\r\n\r\n    #Define Working Path\r\n    path = tempfile.mkdtemp()\r\n    os.environ[\"BITMESSAGE_HOME\"] = path\r\n\r\n    #Start and stop Bitmessage\r\n    bm = bitmessagemain.Main()\r\n    bm.start(daemon=True)\r\n    time.sleep(30)\r\n    bm.stop()\r\n\r\n    #Check if all threads are closed\r\n    while 1:\r\n        time.sleep(2)\r\n        thcount = 0\r\n        threads = threading.enumerate()\r\n        for th in threads:\r\n            if th.is_alive():\r\n                print th\r\n                thcount += 1\r\n        print thcount"}}