Restore old event poll behavior only for OpenSim

Mon, 11 Dec 2017 19:41:02 +0100

author
Ansariel
date
Mon, 11 Dec 2017 19:41:02 +0100
changeset 53563
6b8b1b9d5e2b
parent 53562
81b78f65f168
child 53564
7ca72747f5d6

Restore old event poll behavior only for OpenSim

indra/newview/lleventpoll.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/lleventpoll.cpp	Sat Dec 09 22:42:44 2017 +0100
     1.2 +++ b/indra/newview/lleventpoll.cpp	Mon Dec 11 19:41:02 2017 +0100
     1.3 @@ -43,6 +43,7 @@
     1.4  #include "boost/make_shared.hpp"
     1.5  
     1.6  #include "llsdutil.h" // <FS:ND/> for ll_pretty_print_sd
     1.7 +#include "llviewernetwork.h"
     1.8  
     1.9  namespace LLEventPolling
    1.10  {
    1.11 @@ -103,8 +104,13 @@
    1.12          mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_LONG_POLL);
    1.13          // <FS:Ansariel> Restore pre-coro behavior (60s timeout, no retries)
    1.14          mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions);
    1.15 -        mHttpOptions->setRetries(0);
    1.16 -        mHttpOptions->setTransferTimeout(60);
    1.17 +#ifdef OPENSIM
    1.18 +        if (LLGridManager::instance().isInOpenSim())
    1.19 +        {
    1.20 +            mHttpOptions->setRetries(0);
    1.21 +            mHttpOptions->setTransferTimeout(60);
    1.22 +        }
    1.23 +#endif
    1.24          // </FS:Ansariel>
    1.25          mSenderIp = sender.getIPandPort();
    1.26      }
    1.27 @@ -197,13 +203,15 @@
    1.28                      continue;
    1.29                  }
    1.30                  // <FS:Ansariel> Restore pre-coro behavior (60s timeout, no retries)
    1.31 -                else if (status == LLCore::HttpStatus(HTTP_BAD_GATEWAY))
    1.32 +#ifdef OPENSIM
    1.33 +                else if (status == LLCore::HttpStatus(HTTP_BAD_GATEWAY) && LLGridManager::instance().isInOpenSim())
    1.34                  {   // Pre-coro says this is the default answer for timeouts and it can happen
    1.35                      // frequently on OpenSim - assume this is normal and issue a new request immediately
    1.36                      LL_DEBUGS("LLEventPollImpl") << "Received HTTP 502 - start new request." << LL_ENDL;
    1.37                      errorCount = 0;
    1.38                      continue;
    1.39                  }
    1.40 +#endif
    1.41                  // </FS:Ansariel>
    1.42                  else if ((status == LLCore::HttpStatus(LLCore::HttpStatus::LLCORE, LLCore::HE_OP_CANCELED)) || 
    1.43                          (status == LLCore::HttpStatus(HTTP_NOT_FOUND)))

mercurial