code: public void stop() {
  		
  		if (!this.running.compareAndSet(true, false)) {
  			return;
  		}
  
  		// wake up all connections
  		synchronized (this.connections) {
  			for (final Connection conn : this.connections.values()) {
  				conn.interrupt();
  			}
  		}
  
  		// wait until all connections are closed
  		while (!this.connections.isEmpty()) {
  			try {
  				Thread.sleep(100);
  			} catch (InterruptedException e) {
  			}
  		}
  	}
docs: Stop all threads related to this client. No further calls may be made
  using this client.