diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2012-07-03 13:06:46 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2012-07-03 13:06:46 -0400 |
commit | 2d7b7de20327a40be12a620debaae9917af16cd6 (patch) | |
tree | 501d8a8f5213466c061d31bafc0d43ca9f0657b6 /indra/llcorehttp/_httpservice.cpp | |
parent | 7997a9c4e58f67a8cf4d13cdc3e2a1b536bc1e4d (diff) |
More integration work for texture fetch timeouts.
The fetch state machine received a new timeout during the WAIT_HTTP_REQ
state. For the integration, rather than jump the state to done, we issue
a request cancel and let the notification plumbing do the rest without
any race conditions or special-case logic.
Diffstat (limited to 'indra/llcorehttp/_httpservice.cpp')
-rw-r--r-- | indra/llcorehttp/_httpservice.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp index 92c15b5b8f..f7d9813db0 100644 --- a/indra/llcorehttp/_httpservice.cpp +++ b/indra/llcorehttp/_httpservice.cpp @@ -219,6 +219,31 @@ bool HttpService::changePriority(HttpHandle handle, HttpRequest::priority_t prio } + /// Try to find the given request handle on any of the request + /// queues and cancel the operation. + /// + /// @return True if the request was canceled. + /// + /// Threading: callable by worker thread. +bool HttpService::cancel(HttpHandle handle) +{ + bool canceled(false); + + // Request can't be on request queue so skip that. + + // Check the policy component's queues first + canceled = mPolicy->cancel(handle); + + if (! canceled) + { + // If that didn't work, check transport's. + canceled = mTransport->cancel(handle); + } + + return canceled; +} + + /// Threading: callable by worker thread. void HttpService::shutdown() { |