Close the socket and reset connection specific data.
Finally, emit reason
channel_event on main context if not
NONE.
this |
a Channel |
reason |
a channel event emitted on main context (or NONE) |