@Override
 public void close() {
   if (ConnectionState.CONNECTED == getConnectionState()) {
     socket.close();
   }
 }