{"action":"opened","issue":{"url":"https://api.github.com/repos/rooseveltframework/roosevelt/issues/249","repository_url":"https://api.github.com/repos/rooseveltframework/roosevelt","labels_url":"https://api.github.com/repos/rooseveltframework/roosevelt/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/rooseveltframework/roosevelt/issues/249/comments","events_url":"https://api.github.com/repos/rooseveltframework/roosevelt/issues/249/events","html_url":"https://github.com/rooseveltframework/roosevelt/issues/249","id":272373677,"number":249,"title":"[minor] HTTPS-Only still attempts to add listener to httpServer","user":{"login":"jkae","id":20359672,"avatar_url":"https://avatars2.githubusercontent.com/u/20359672?v=4","gravatar_id":"","url":"https://api.github.com/users/jkae","html_url":"https://github.com/jkae","followers_url":"https://api.github.com/users/jkae/followers","following_url":"https://api.github.com/users/jkae/following{/other_user}","gists_url":"https://api.github.com/users/jkae/gists{/gist_id}","starred_url":"https://api.github.com/users/jkae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkae/subscriptions","organizations_url":"https://api.github.com/users/jkae/orgs","repos_url":"https://api.github.com/users/jkae/repos","events_url":"https://api.github.com/users/jkae/events{/privacy}","received_events_url":"https://api.github.com/users/jkae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-08T22:30:50Z","updated_at":"2017-11-08T22:30:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**roosevelt.js:106..115**\r\n```\r\n// assign individual keys to connections when opened\r\nhttpServer.on('connection', function (conn) {\r\n  let key = conn.remoteAddress + ':' + conn.remotePort\r\n  connections[key] = conn\r\n\r\n  // once the connection closes, remove\r\n  conn.on('close', function () {\r\n    delete connections[key]\r\n  })\r\n})\r\n```\r\n\r\nWhen running Roosevelt in `httpsOnly: true`, `httpServer` will not be assigned a value. This call to `httpServer.on` will fail & throw an error.\r\n\r\nI also find it interesting that this listener is only active on httpServer connections & ignores httpsServer, though that is likely intentional."}}
{"actor":{"display_login":"jkae"}}