title: QLocalServer IPC client works, server not
body: <p>okay this one seems tricky. I implemented a QLocalServer to do some IPC. But it won't work properly. The client connects and tells me he is connected. the server...well...not, which makes me unable to recieve any messages.</p>
  
  <p>the server implementation looks like this:</p>
  
  <pre><code>PipeServer::PipeServer(QString servername, QObject *parent) : QObject(parent) {
      m_server = new QLocalServer(this);
      m_server-&gt;setSocketOptions(QLocalServer::WorldAccessOption);
  
      if (!m_server-&gt;listen(servername)) {
          logToFile("Unable to start the Server");
      } else {
          logToFile("Server up and running");
      }
  
      connect(m_server, SIGNAL(newConnection()), this, SLOT(socket_new_connection()));
  }
  
  void PipeServer::socket_new_connection() {
  
      logToFile("incoming connection");
  
      /* handling of connection ... */
  
  }
  </code></pre>
  
  <p>output server:</p>
  
  <pre><code>[Debug]: Server up and running
  </code></pre>
  
  <p>output client:</p>
  
  <pre><code>[Debug]: ConnectingState 
  [Debug]: ConnectedState 
  [Debug]: socket_connected 
  </code></pre>
  
  <p>output client with no running server:</p>
  
  <pre><code>[Debug]: ConnectingState 
  [Debug]: UnconnectedState 
  [Debug]: socket_error 
  [Debug]: ServerNotFoundError 
  </code></pre>
  
  <p>client output if i close the server while the client is connected:</p>
  
  <pre><code>[Debug]: ClosingState 
  [Debug]: UnconnectedState 
  [Debug]: socket_disconnected 
  </code></pre>
  
  <p>so the client is definitely connecting to the server, but the server's <code>newConnection()</code> signal is never called. i even tried to check the connection myself with <code>m_server-&gt;hasPendingConnections()</code> ...but that returns false, too...</p>
  
  <p>[edit]</p>
  
  <p>i check the server status every 30 seconds:</p>
  
  <pre><code>void PipeServer::checkListening(){
  
  if(m_server-&gt;isListening()){
      logToFile("server is listening");
  } else {
      logToFile("server is NOT listening");
  }
  
  if(m_server-&gt;hasPendingConnections()){
      logToFile("server has pending connections");
  } else {
      logToFile("server has no pending connections");
  }
  
  }
  </code></pre>
  
  <p>which outputs:</p>
  
  <pre><code>[Debug]: server is listening
  [Debug]: server has no pending connections
  </code></pre>