[Libreoffice-commits] .: sd/source

Andrzej J.R. Hunt ajrhunt at kemper.freedesktop.org
Tue Aug 7 00:36:59 PDT 2012


 sd/source/ui/remotecontrol/Server.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 67f688b97aa5afde455674dbe28297a89d817503
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date:   Tue Aug 7 09:29:35 2012 +0200

    Hopefully cleanly close Server Thread when necessary.
    
    Change-Id: If5a850b2f4c813c5a277ed0d4bc5179dd4095b10

diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 9be7f2b..cb982de 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -112,7 +112,10 @@ void RemoteServer::execute()
     while ( true )
     {
         fprintf( stderr, "Awaiting a connection.\n" );
-        mSocket.acceptConnection( mStreamSocket );
+        if ( mSocket.acceptConnection( mStreamSocket ) == osl_Socket_Error ) {
+            // Socket closed or other problem
+            return;
+        }
         fprintf( stderr, "Accepted a connection!\n" );
         listenThread();
     }


More information about the Libreoffice-commits mailing list