disconnect when connect.state is connected it returns error and destroys the client