The current code will emit 'disconnect' before `.disconnect()` returns usually, but sometimes after. Its awkward, but I'm trying to find a way to describe that.

Alternatively, the current behaviour could be considered a bug. Shall I modify the code to emit in process.nextTick(), so that it consistently emits after return?