docs: private void replaceSocket(Socket newSocket) {
          synchronized (m_socketLock) {
              closeSocket(m_socket);
              if (m_eos.get()) {
                  closeSocket(newSocket);
                  m_socket = null;
              } else {
                  m_socket = newSocket;
              }
          }
      }