• Joerg Bornemann's avatar
    QLocalServer/Win: Fix race condition in listen(). · ac8dae8b
    Joerg Bornemann authored
    
    Suppose a client connects while the QLocalServer is still in the loop
    that calls addListener. The connection would SetEvent(eventHandle),
    but every call to ConnectNamedPipe would ResetEvent(eventHandle).
    Thus, the connection is never detected by the notifier on eventHandle.
      Callers of addListener must check the connection state of every
    listener to make sure that no client connected while setting up
    listeners.
    
    Task-number: QTBUG-49254
    Change-Id: Ia961927ea76973708e6e3f73510695eb5d6a0e4c
    Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
    ac8dae8b