code: private void checkError() throws IOException {
  		final Throwable t = channelError.get();
  
  		if (t != null) {
  			if (t instanceof IOException) {
  				throw (IOException) t;
  			} else {
  				throw new IOException("There has been an error in the channel.", t);
  			}
  		}
  	}
docs: Checks for an error and rethrows it if one was reported.