diff options
Diffstat (limited to 'libsoup')
-rw-r--r-- | libsoup/http1/soup-client-message-io-http1.c | 2 | ||||
-rw-r--r-- | libsoup/soup-message-queue-item.h | 1 | ||||
-rw-r--r-- | libsoup/soup-session.c | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/libsoup/http1/soup-client-message-io-http1.c b/libsoup/http1/soup-client-message-io-http1.c index ab589e43..46029612 100644 --- a/libsoup/http1/soup-client-message-io-http1.c +++ b/libsoup/http1/soup-client-message-io-http1.c @@ -1043,6 +1043,8 @@ soup_client_message_io_http1_send_item (SoupClientMessageIO *iface, #ifdef HAVE_SYSPROF msg_io->begin_time_nsec = SYSPROF_CAPTURE_CURRENT_TIME; #endif + if (io->msg_io) + g_warn_if_reached (); io->msg_io = msg_io; io->is_reusable = FALSE; diff --git a/libsoup/soup-message-queue-item.h b/libsoup/soup-message-queue-item.h index cb483668..9a958342 100644 --- a/libsoup/soup-message-queue-item.h +++ b/libsoup/soup-message-queue-item.h @@ -20,6 +20,7 @@ typedef enum { SOUP_MESSAGE_READY, SOUP_MESSAGE_RUNNING, SOUP_MESSAGE_CACHED, + SOUP_MESSAGE_REQUEUED, SOUP_MESSAGE_RESTARTING, SOUP_MESSAGE_FINISHING, SOUP_MESSAGE_FINISHED diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index d1df9226..7380ff0a 100644 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -1205,7 +1205,7 @@ soup_session_requeue_item (SoupSession *session, retval = FALSE; } else { item->resend_count++; - item->state = SOUP_MESSAGE_RESTARTING; + item->state = SOUP_MESSAGE_REQUEUED; retval = TRUE; } @@ -1590,6 +1590,9 @@ message_completed (SoupMessage *msg, SoupMessageIOCompletion completion, gpointe return; } + if (item->state == SOUP_MESSAGE_REQUEUED) + item->state = SOUP_MESSAGE_RESTARTING; + if (item->state != SOUP_MESSAGE_RESTARTING) { item->state = SOUP_MESSAGE_FINISHING; @@ -1646,6 +1649,9 @@ tunnel_message_completed (SoupMessage *msg, SoupMessageIOCompletion completion, SoupSession *session = tunnel_item->session; guint status; + if (tunnel_item->state == SOUP_MESSAGE_REQUEUED) + tunnel_item->state = SOUP_MESSAGE_RESTARTING; + if (tunnel_item->state == SOUP_MESSAGE_RESTARTING) { soup_message_restarted (msg); if (soup_message_get_connection (tunnel_item->msg)) { @@ -2028,6 +2034,7 @@ soup_session_process_queue_item (SoupSession *session, case SOUP_MESSAGE_CACHED: case SOUP_MESSAGE_TUNNELING: + case SOUP_MESSAGE_REQUEUED: /* Will be handled elsewhere */ return; |