aboutsummaryrefslogtreecommitdiff
path: root/backends/networking
diff options
context:
space:
mode:
Diffstat (limited to 'backends/networking')
-rw-r--r--backends/networking/curl/curlrequest.cpp6
-rw-r--r--backends/networking/curl/curlrequest.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/backends/networking/curl/curlrequest.cpp b/backends/networking/curl/curlrequest.cpp
index f7d169cdca..887ba86c6e 100644
--- a/backends/networking/curl/curlrequest.cpp
+++ b/backends/networking/curl/curlrequest.cpp
@@ -148,4 +148,10 @@ NetworkReadStreamResponse CurlRequest::execute() {
const NetworkReadStream *CurlRequest::getNetworkReadStream() const { return _stream; }
+void CurlRequest::wait(int spinlockDelay) {
+ while (state() == Networking::PROCESSING) {
+ g_system->delayMillis(spinlockDelay);
+ }
+}
+
} // End of namespace Networking
diff --git a/backends/networking/curl/curlrequest.h b/backends/networking/curl/curlrequest.h
index 75fb787f86..f8d71c4828 100644
--- a/backends/networking/curl/curlrequest.h
+++ b/backends/networking/curl/curlrequest.h
@@ -93,6 +93,9 @@ public:
/** Returns Request's NetworkReadStream. */
const NetworkReadStream *getNetworkReadStream() const;
+
+ /** Waits for Request to be processed. Should be called after Request is put into ConnMan. */
+ void wait(int spinlockDelay = 5);
};
} // End of namespace Networking