From f385211b1f2b279d47dce380d5ab7e83d7a6ada0 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Tue, 23 Jul 2013 13:35:57 +0200
Subject: [PATCH] curl_easy_pause: on unpause, trigger mulit-socket handling

When the multi-socket API is used, we need the handle to be checked
again when it gets unpaused.

Bug: http://curl.haxx.se/mail/lib-2013-07/0239.html
Reported-by: Justin Karneges
---
 lib/easy.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/easy.c b/lib/easy.c
index d84ecf5..a65e30d 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -850,6 +850,13 @@ CURLcode curl_easy_pause(CURL *curl, int action)
     free(freewrite); /* this is unconditionally no longer used */
   }
 
+  /* if there's no error and we're not pausing both directions, we want
+     to have this handle checked soon */
+  if(!result &&
+     ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
+      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) )
+    Curl_expire(data, 1); /* get this handle going again */
+
   return result;
 }
 
-- 
1.7.10.4

