fix client does not emit disconnect event when enable reconnect

let client emits disconnect  event when create client with reconnect