update device connect close will close socket.