diff --git a/libsoup/soup-session-sync.c b/libsoup/soup-session-sync.c
index 408e307..03beb21 100644
--- a/libsoup/soup-session-sync.c
+++ b/libsoup/soup-session-sync.c
@@ -276,8 +276,14 @@ process_queue_item (SoupMessageQueueItem *item)
 			g_mutex_lock (priv->lock);
 			do {
 				get_connection (item);
-				if (item->state == SOUP_MESSAGE_AWAITING_CONNECTION)
-					g_cond_wait (priv->cond, priv->lock);
+				if (item->state == SOUP_MESSAGE_AWAITING_CONNECTION) {
+					GTimeVal timeout = { 0 };
+
+					g_get_current_time (&timeout);
+					g_time_val_add (&timeout, 250000);
+
+					g_cond_timed_wait (priv->cond, priv->lock, &timeout);
+				}
 			} while (item->state == SOUP_MESSAGE_AWAITING_CONNECTION);
 			g_mutex_unlock (priv->lock);
 			break;
