ensure irc socket closes

Very simple, implemented based on comments from the issue:
https://github.com/github/github-services/issues/621