{"action":"created","issue":{"url":"https://api.github.com/repos/kanongil/exiting/issues/3","repository_url":"https://api.github.com/repos/kanongil/exiting","labels_url":"https://api.github.com/repos/kanongil/exiting/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/kanongil/exiting/issues/3/comments","events_url":"https://api.github.com/repos/kanongil/exiting/issues/3/events","html_url":"https://github.com/kanongil/exiting/issues/3","id":257027936,"number":3,"title":"Handling SIGHUP","user":{"login":"colmonty","id":1135581,"avatar_url":"https://avatars2.githubusercontent.com/u/1135581?v=4","gravatar_id":"","url":"https://api.github.com/users/colmonty","html_url":"https://github.com/colmonty","followers_url":"https://api.github.com/users/colmonty/followers","following_url":"https://api.github.com/users/colmonty/following{/other_user}","gists_url":"https://api.github.com/users/colmonty/gists{/gist_id}","starred_url":"https://api.github.com/users/colmonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colmonty/subscriptions","organizations_url":"https://api.github.com/users/colmonty/orgs","repos_url":"https://api.github.com/users/colmonty/repos","events_url":"https://api.github.com/users/colmonty/events{/privacy}","received_events_url":"https://api.github.com/users/colmonty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-09-12T12:38:12Z","updated_at":"2017-09-14T14:58:03Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nFirstly, thanks for writing `Exiting` - it's allowed my HapiJS docker containers to exit quickly and cleanly, as opposed to having to wait 10s to be killed.\r\n\r\nWhen I attempt to send a `SIGHUP` to my docker container (using any of the methods [here](https://blog.confirm.ch/sending-signals-docker-container/)), my HapiJS container shuts down and reports:\r\n\r\n```text\r\n[exiting] Server stop failed: Error: Process aborted\r\n```\r\n\r\nI need to handle `SIGHUP` to reload secrets every n minutes, when they are rotated by Hashicorp Vault and other parts of the infra send a `SIGHUP` to each container which cares about this.\r\n\r\nThe basics of my server:\r\n\r\n```javascript\r\nconst composer = require('./index');\r\nconst Exiting = require('exiting');\r\n\r\ncomposer((err, server) => {\r\n\r\n  if (err) {\r\n    throw err;\r\n  }\r\n\r\n  new Exiting.Manager(server).start(() => {\r\n    console.log(`Started Service on port ${server.info.port}`);\r\n  });\r\n\r\n  server.on('stop', () => {\r\n    console.log('Server stopped');\r\n  });\r\n\r\n  process.on('SIGHUP', () => {\r\n    console.log(`SIGHUP received`);\r\n  });\r\n});\r\n```\r\n\r\nAny ideas what might be going on? I'm not seeing either `Server stopped` or `SIGHUP received` being logged."},"comment":{"url":"https://api.github.com/repos/kanongil/exiting/issues/comments/329509187","html_url":"https://github.com/kanongil/exiting/issues/3#issuecomment-329509187","issue_url":"https://api.github.com/repos/kanongil/exiting/issues/3","id":329509187,"user":{"login":"colmonty","id":1135581,"avatar_url":"https://avatars2.githubusercontent.com/u/1135581?v=4","gravatar_id":"","url":"https://api.github.com/users/colmonty","html_url":"https://github.com/colmonty","followers_url":"https://api.github.com/users/colmonty/followers","following_url":"https://api.github.com/users/colmonty/following{/other_user}","gists_url":"https://api.github.com/users/colmonty/gists{/gist_id}","starred_url":"https://api.github.com/users/colmonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colmonty/subscriptions","organizations_url":"https://api.github.com/users/colmonty/orgs","repos_url":"https://api.github.com/users/colmonty/repos","events_url":"https://api.github.com/users/colmonty/events{/privacy}","received_events_url":"https://api.github.com/users/colmonty/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T14:58:03Z","updated_at":"2017-09-14T14:58:03Z","author_association":"NONE","body":"actually, reverted to your master and getting the same error on `npm test`"}}
{"actor":{"display_login":"colmonty"}}