code: protected void update() {
          if(conHandler.shouldStop()) {
              Utils.closeQuietly(this);
              return;
          }
  
          String line;
  
          try {
              line = reader.readLine();
          } catch(SocketTimeoutException ex) {
              // Check if the socket has timed out
              if(!dataConnections.isEmpty() && (System.currentTimeMillis() - lastUpdate) >= timeout) {
                  Utils.closeQuietly(this);
              }
              return;
          } catch(IOException ex) {
              return;
          }
  
          if(line == null) {
              Utils.closeQuietly(this);
              return;
          }
  
          if(line.isEmpty()) return;
  
          process(line);
      }
docs: Updates the connection