Home GnuPG

Fix server crash on client disconnect

Description

Fix server crash on client disconnect

When a web client disconnects, the associated QWebSocket object is deleted via WebServer::socketDisconnected. So far this happens by immediately calling the destructor (as we release the unique_ptr from the m_clients list).

However, the QWebSocket may still be needed in the Qt event loop at this time, so the event loop will crash on the next iteration. We have to call QObject::deleteLater(), instead.

https://dev.gnupg.org/D619

Details

Provenance
tfryAuthored on Thu, Dec 11, 9:40 AM
Parents
rOJ664af1c82e05: Fix build after last merge
Branches
Unknown
Tags
Unknown