{"action":"created","issue":{"url":"https://api.github.com/repos/falk0069/hue-upnp/issues/11","labels_url":"https://api.github.com/repos/falk0069/hue-upnp/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/falk0069/hue-upnp/issues/11/comments","events_url":"https://api.github.com/repos/falk0069/hue-upnp/issues/11/events","html_url":"https://github.com/falk0069/hue-upnp/issues/11","id":125822216,"number":11,"title":"Reuse HTTP address","user":{"login":"dstmar","id":5498292,"avatar_url":"https://avatars.githubusercontent.com/u/5498292?v=3","gravatar_id":"","url":"https://api.github.com/users/dstmar","html_url":"https://github.com/dstmar","followers_url":"https://api.github.com/users/dstmar/followers","following_url":"https://api.github.com/users/dstmar/following{/other_user}","gists_url":"https://api.github.com/users/dstmar/gists{/gist_id}","starred_url":"https://api.github.com/users/dstmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstmar/subscriptions","organizations_url":"https://api.github.com/users/dstmar/orgs","repos_url":"https://api.github.com/users/dstmar/repos","events_url":"https://api.github.com/users/dstmar/events{/privacy}","received_events_url":"https://api.github.com/users/dstmar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-10T14:13:10Z","updated_at":"2016-01-16T18:13:28Z","closed_at":null,"body":"I'm having issues when restarting hueUpnp because the HTTP port is still in a TIME_WAIT state.  I've managed to get it working by setting allow_reuse_address on SocketServer.ThreadingTCPServer before an instance is created, instead of setting it on the instance of self.server itself.\r\n\r\nCurrently (around line 247):\r\nself.server = SocketServer.ThreadingTCPServer((CONFIG.standard['IP'], CONFIG.standard['HTTP_PORT']), HttpdRequestHandler)\r\nself.server.allow_reuse_address = True\r\n\r\nThe following seems to work for me:\r\nSocketServer.ThreadingTCPServer.allow_reuse_address = True\r\nself.server = SocketServer.ThreadingTCPServer((CONFIG.standard['IP'], CONFIG.standard['HTTP_PORT']), HttpdRequestHandler)"},"comment":{"url":"https://api.github.com/repos/falk0069/hue-upnp/issues/comments/172240335","html_url":"https://github.com/falk0069/hue-upnp/issues/11#issuecomment-172240335","issue_url":"https://api.github.com/repos/falk0069/hue-upnp/issues/11","id":172240335,"user":{"login":"falk0069","id":10950025,"avatar_url":"https://avatars.githubusercontent.com/u/10950025?v=3","gravatar_id":"","url":"https://api.github.com/users/falk0069","html_url":"https://github.com/falk0069","followers_url":"https://api.github.com/users/falk0069/followers","following_url":"https://api.github.com/users/falk0069/following{/other_user}","gists_url":"https://api.github.com/users/falk0069/gists{/gist_id}","starred_url":"https://api.github.com/users/falk0069/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/falk0069/subscriptions","organizations_url":"https://api.github.com/users/falk0069/orgs","repos_url":"https://api.github.com/users/falk0069/repos","events_url":"https://api.github.com/users/falk0069/events{/privacy}","received_events_url":"https://api.github.com/users/falk0069/received_events","type":"User","site_admin":false},"created_at":"2016-01-16T18:13:28Z","updated_at":"2016-01-16T18:13:28Z","body":"Dstmar,\r\n\r\nYour code suggestion works great!  It still prevents duplicate servers from running and yet allows to start if only TIME_WAITs exist.  Thanks for your contribution.  I'll be adding it to source.  Thanks\r\n"}}