]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Fix warning when tests complete
authorRobert Ancell <robert.ancell@canonical.com>
Thu, 14 Jul 2016 02:44:47 +0000 (14:44 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Thu, 14 Jul 2016 02:44:47 +0000 (14:44 +1200)
tests/src/test-runner.c

index 018007046f71256aaa1d644c3ca82e3d70fbe86c..bcb6f8eea1d7a5a86018c4d9b7ffd91f30bd54be 100644 (file)
@@ -1107,7 +1107,12 @@ status_message_cb (GSocket *socket, GIOCondition condition, StatusClient *client
     if (n_read > 0)
         n_read = g_socket_receive (socket, buffer, length, NULL, &error);
     if (error)
-        g_warning ("Error reading from socket: %s", error->message);
+    {
+        if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED))
+            n_read = 0;
+        else
+            g_warning ("Error reading from socket: %s", error->message);
+    }
     g_clear_error (&error);
     if (n_read == 0)
     {