about summary refs log tree commit homepage
path: root/http_put.c
diff options
context:
space:
mode:
Diffstat (limited to 'http_put.c')
-rw-r--r--http_put.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/http_put.c b/http_put.c
index 277faa7..56a6325 100644
--- a/http_put.c
+++ b/http_put.c
@@ -488,6 +488,9 @@ retry:
                 need -= r;
                 if (need == 0)
                         return http_put_commit(http);
+
+                if (mog_ioq_contended())
+                        return MOG_NEXT_WAIT_RD;
                 goto again;
         }
         if (r != 0) {
@@ -543,6 +546,9 @@ again:
                 /* chunk is complete */
                 if (http->_p.content_len == 0)
                         mog_chunk_init(http);
+
+                if (mog_ioq_contended())
+                        return MOG_NEXT_WAIT_RD;
                 goto again;
         case MOG_CHUNK_STATE_TRAILER:
 chunk_state_trailer: