tcp-bsd: Handle send before connect() completes
authorOle André Vadla Ravnås <oleavr@gmail.com>
Sun, 9 May 2021 21:55:07 +0000 (23:55 +0200)
committerOle André Vadla Ravnås <oleavr@gmail.com>
Sun, 9 May 2021 22:03:49 +0000 (00:03 +0200)
socket/tcp-bsd.c

index 3cac22c..194f29f 100644 (file)
@@ -322,6 +322,7 @@ socket_send_message (NiceSocket *sock,
 
     if (ret < 0) {
       if (g_error_matches (gerr, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK) ||
+          g_error_matches (gerr, G_IO_ERROR, G_IO_ERROR_NOT_CONNECTED) ||
           g_error_matches (gerr, G_IO_ERROR, G_IO_ERROR_FAILED)) {
         /* Queue the message and send it later. */
         nice_socket_queue_send_with_callback (&priv->send_queue,