diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp
index 4168e0c67b8a0d33f7181c5782b69ea2e16c6072..210b83ae2d75cf251393029f41e031a22267f3d7 100644
--- a/indra/llmessage/llcoproceduremanager.cpp
+++ b/indra/llmessage/llcoproceduremanager.cpp
@@ -342,10 +342,10 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
     CoprocQueuePtr pendingCoprocs,
     LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter)
 {
-    QueuedCoproc::ptr_t coproc;
-    boost::fibers::channel_op_status status;
     for (;;)
     {
+        QueuedCoproc::ptr_t coproc;
+        boost::fibers::channel_op_status status;
         {
             LLCoros::TempStatus st("waiting for work for 10s");
             status = pendingCoprocs->pop_wait_for(coproc, std::chrono::seconds(10));