Emit 'disconnected' when disconnect

Emit 'disconnected' when disconnect