code: @Override
  	public synchronized void releaseThriftSocket(ThriftSocket thriftSocket, String host, int port) {
  		if (thriftSocket == null || thriftSocket.getSocket() == null
  				|| thriftSocket.getSocket().getInetAddress() == null) {
  			log.debug("Release unsuccessful .");
  			return;
  		}
  		if (!ServerUtil.checkHostAndPort(host, port)) {
  			log.error("Server host or port is null ! Release unsuccessful .");
  			return;
  		}
  		log.debug("Release socket , host is {} and port is {} .", host, port);
  		SimpleSocketPoolImpl self = selfMap.get(ServerUtil.buildCacheKey(host, port));
  		if (self == null)
  			return;
  		for (byte i = 0; i < size; i++)
  			if (self.socketPool.get(new Byte(i)) == thriftSocket) {
  				self.socketStatusArray[i] = Boolean.FALSE;
  				return;
  			}
  		// 如果socket不在池中,就直接关闭
  		thriftSocket.close();
  	}
docs: 回收ThriftSocket连接