Error by sending the closed socket message to the client fixed, now just ok is returned