code: public void close() throws QueryException {
          try {
              if(! (socket instanceof SSLSocket))
                  socket.shutdownInput();
          } catch (IOException ignored) {
          }
          try {
              final ClosePacket closePacket = new ClosePacket();
              closePacket.send(writer);
              if (! (socket instanceof SSLSocket))
                  socket.shutdownOutput();
              writer.close();
              packetFetcher.close();
          } catch (IOException e) {
              throw new QueryException("Could not close connection: " + e.getMessage(),
                      -1,
                      SQLExceptionMapper.SQLStates.CONNECTION_EXCEPTION.getSqlState(),
                      e);
          } finally {
              try {
                  this.connected = false;
                  socket.close();
              } catch (IOException e) {
                  log.warning("Could not close socket");
              }
          }
          this.connected = false;
      }
docs: Closes socket and stream readers/writers
  
  @throws org.drizzle.jdbc.internal.common.QueryException
  if the socket or readers/writes cannot be closed