{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus.Host/issues/51","labels_url":"https://api.github.com/repos/Particular/NServiceBus.Host/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.Host/issues/51/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus.Host/issues/51/events","html_url":"https://github.com/Particular/NServiceBus.Host/issues/51","id":128129443,"number":51,"title":"Timebox the shutdown to prevent the windows service from hanging","user":{"login":"andreasohlund","id":125028,"avatar_url":"https://avatars.githubusercontent.com/u/125028?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasohlund","html_url":"https://github.com/andreasohlund","followers_url":"https://api.github.com/users/andreasohlund/followers","following_url":"https://api.github.com/users/andreasohlund/following{/other_user}","gists_url":"https://api.github.com/users/andreasohlund/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasohlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasohlund/subscriptions","organizations_url":"https://api.github.com/users/andreasohlund/orgs","repos_url":"https://api.github.com/users/andreasohlund/repos","events_url":"https://api.github.com/users/andreasohlund/events{/privacy}","received_events_url":"https://api.github.com/users/andreasohlund/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Particular/NServiceBus.Host/labels/Type:%20Bug","name":"Type: Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":{"login":"dvdstelt","id":1257410,"avatar_url":"https://avatars.githubusercontent.com/u/1257410?v=3","gravatar_id":"","url":"https://api.github.com/users/dvdstelt","html_url":"https://github.com/dvdstelt","followers_url":"https://api.github.com/users/dvdstelt/followers","following_url":"https://api.github.com/users/dvdstelt/following{/other_user}","gists_url":"https://api.github.com/users/dvdstelt/gists{/gist_id}","starred_url":"https://api.github.com/users/dvdstelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvdstelt/subscriptions","organizations_url":"https://api.github.com/users/dvdstelt/orgs","repos_url":"https://api.github.com/users/dvdstelt/repos","events_url":"https://api.github.com/users/dvdstelt/events{/privacy}","received_events_url":"https://api.github.com/users/dvdstelt/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-01-22T10:44:57Z","updated_at":"2016-01-27T09:24:10Z","closed_at":null,"body":"At the moment we call \"bus.Stop\" syncronously. Since bus.Stop can hang indefinitely this means that we can't guarantee that the windows service will stop at all times. This behavior prevents service recovery to kick in and also confuses users that might belive that the service is running while its in a half stopped state.\r\n\r\nI propose that we time box the shutdown and give up after lets say 30 seconds to allows the service to go down and be restarted.\r\n\r\nThere is a global flag that can be set (@gbiellem please add link) to tell the OS to always kill the service after a given time but since that is not on by default we should be safe and timebox instead. We should still add doco to highlight and recommend this flag."},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus.Host/issues/comments/175506275","html_url":"https://github.com/Particular/NServiceBus.Host/issues/51#issuecomment-175506275","issue_url":"https://api.github.com/repos/Particular/NServiceBus.Host/issues/51","id":175506275,"user":{"login":"SimonCropp","id":122666,"avatar_url":"https://avatars.githubusercontent.com/u/122666?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonCropp","html_url":"https://github.com/SimonCropp","followers_url":"https://api.github.com/users/SimonCropp/followers","following_url":"https://api.github.com/users/SimonCropp/following{/other_user}","gists_url":"https://api.github.com/users/SimonCropp/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonCropp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonCropp/subscriptions","organizations_url":"https://api.github.com/users/SimonCropp/orgs","repos_url":"https://api.github.com/users/SimonCropp/repos","events_url":"https://api.github.com/users/SimonCropp/events{/privacy}","received_events_url":"https://api.github.com/users/SimonCropp/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T09:24:10Z","updated_at":"2016-01-27T09:24:10Z","body":"@andreasohlund how would u code that?"}}