diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 9267724..20b659b 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -2353,7 +2353,9 @@ soup_session_real_cancel_message (SoupSession *session, SoupMessage *msg, guint
 	item = soup_message_queue_lookup (priv->queue, msg);
 	g_return_if_fail (item != NULL);
 
-	item->paused = FALSE;
+	if(item->paused)
+		soup_session_unpause_message (session, msg);
+
 	soup_message_set_status (msg, status_code);
 	g_cancellable_cancel (item->cancellable);
 
diff --git a/tests/session-test.c b/tests/session-test.c
index 84fe35b..4a46c0c 100644
--- a/tests/session-test.c
+++ b/tests/session-test.c
@@ -142,6 +142,22 @@ do_test_for_session (SoupSession *session, SoupURI *uri,
 
 	soup_test_assert_message_status (msg, SOUP_STATUS_CANCELLED);
 	g_object_unref (msg);
+
+	msg = soup_message_new_from_uri ("GET", uri);
+
+	finished = FALSE;
+	soup_session_queue_message (session, msg, finished_cb, &finished);
+
+	while(g_main_context_iteration (NULL, FALSE));
+
+	soup_session_pause_message (session, msg);
+
+	while(g_main_context_iteration (NULL, FALSE));
+
+	soup_session_cancel_message (session, msg, SOUP_STATUS_CANCELLED);
+
+	while (!finished)
+		g_main_context_iteration (NULL, TRUE);
 }
 
 static void
