tianqi22 / monav

Automatically exported from code.google.com/p/monav
0 stars 0 forks source link

Allow clients to disconnect early #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I want to use a simple method in my code to detect whether MoNavD is running:

bool MonavPluginPrivate::isDaemonRunning() const
{
    QLocalSocket socket;
    socket.connectToServer( "MoNavD" );
    return socket.waitForConnected();
}

Currently MoNavD enters an endless loop polling the CPU in that case (the 
connection is closed without sending a command and in->waitForReadyRead( 1000 
); returns immediately in signals.h). A patch is attached.

Original issue reported on code.google.com by earthwi...@gentoo.org on 5 Sep 2010 at 9:00

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r225.

Original comment by veaac.fd...@gmail.com on 6 Sep 2010 at 9:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision ab8525db8606.

Original comment by veaac.fd...@gmail.com on 23 Apr 2011 at 3:58