docs: private void cleanupWriterSocket(PrintWriter pwriter) {
          try {
              if (pwriter != null) {
                  pwriter.flush();
                  pwriter.close();
              }
          } catch (Exception e) {
              LOG.info("Error closing PrintWriter ", e);
          } finally {
              try {
                  close();
              } catch (Exception e) {
                  LOG.error("Error closing a command socket ", e);
              }
          }
      }