{"action":"created","issue":{"url":"https://api.github.com/repos/sukona/Grapevine/issues/182","repository_url":"https://api.github.com/repos/sukona/Grapevine","labels_url":"https://api.github.com/repos/sukona/Grapevine/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/sukona/Grapevine/issues/182/comments","events_url":"https://api.github.com/repos/sukona/Grapevine/issues/182/events","html_url":"https://github.com/sukona/Grapevine/issues/182","id":246757113,"number":182,"title":"Automatically shutdown server on program shutdown","user":{"login":"tmontney","id":7938064,"avatar_url":"https://avatars3.githubusercontent.com/u/7938064?v=4","gravatar_id":"","url":"https://api.github.com/users/tmontney","html_url":"https://github.com/tmontney","followers_url":"https://api.github.com/users/tmontney/followers","following_url":"https://api.github.com/users/tmontney/following{/other_user}","gists_url":"https://api.github.com/users/tmontney/gists{/gist_id}","starred_url":"https://api.github.com/users/tmontney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmontney/subscriptions","organizations_url":"https://api.github.com/users/tmontney/orgs","repos_url":"https://api.github.com/users/tmontney/repos","events_url":"https://api.github.com/users/tmontney/events{/privacy}","received_events_url":"https://api.github.com/users/tmontney/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-31T13:33:03Z","updated_at":"2017-08-07T22:03:03Z","closed_at":"2017-08-07T22:03:03Z","body":"If you close a program's front-end, Grapevine does not shutdown automatically. This leaves whatever port you were listening on open, and it's very difficult (if not impossible) to stop it without rebooting the entire machine.\r\n\r\nYou can accomplish this automatically by shutting down the server if the object is disposed. The object is disposed when the main thread is destroyed. Something like the following needs to be added to the server's constructor.\r\n\r\n    Private Sub Server_Close(sender As Object, e As EventArgs) Handles MyBase.Disposed\r\n        If svr IsNot Nothing AndAlso svr.IsListening Then svr.Stop()\r\n    End Sub"},"comment":{"url":"https://api.github.com/repos/sukona/Grapevine/issues/comments/320793305","html_url":"https://github.com/sukona/Grapevine/issues/182#issuecomment-320793305","issue_url":"https://api.github.com/repos/sukona/Grapevine/issues/182","id":320793305,"user":{"login":"scottoffen","id":3513626,"avatar_url":"https://avatars3.githubusercontent.com/u/3513626?v=4","gravatar_id":"","url":"https://api.github.com/users/scottoffen","html_url":"https://github.com/scottoffen","followers_url":"https://api.github.com/users/scottoffen/followers","following_url":"https://api.github.com/users/scottoffen/following{/other_user}","gists_url":"https://api.github.com/users/scottoffen/gists{/gist_id}","starred_url":"https://api.github.com/users/scottoffen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottoffen/subscriptions","organizations_url":"https://api.github.com/users/scottoffen/orgs","repos_url":"https://api.github.com/users/scottoffen/repos","events_url":"https://api.github.com/users/scottoffen/events{/privacy}","received_events_url":"https://api.github.com/users/scottoffen/received_events","type":"User","site_admin":false},"created_at":"2017-08-07T22:03:03Z","updated_at":"2017-08-07T22:03:03Z","body":"After some looking around, I am unable to find a way to do this that works. If you have a suggestion or working code, please post it here. Otherwise, I would recommend using the provided `Dispose` pattern."}}
{"actor":{"display_login":"scottoffen"}}