code: protected void disconnect() {
  
  		// Stop broadcaster
  		if (locator != null) {
  			locator.disconnect();
  			locator = null;
  		}
  
  		// Stop gossiper's timer
  		if (gossiperTimer != null) {
  			gossiperTimer.cancel(false);
  			gossiperTimer = null;
  		}
  
  		// Close socket reader
  		if (reader != null) {
  			reader.disconnect();
  			reader = null;
  		}
  
  		// Close socket writer
  		if (writer != null) {
  			writer.disconnect();
  			writer = null;
  		}
  	}
docs: --- DISCONNECT ---