summaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-05-30 17:32:09 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-05-30 17:32:09 +0200
commitd5e63cea21932dbc03e513e205f0f3c66cc8c350 (patch)
treeefdd592418a864c7843a638b5e3c32ee4f964803 /src/platform
parent78fda8bb62a85fe0a536d2f38832a6123739e4c1 (diff)
downloadqtlocation-mapboxgl-d5e63cea21932dbc03e513e205f0f3c66cc8c350.tar.gz
retain the uv loop until all things deconstructed
fixes #261
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/request.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platform/request.cpp b/src/platform/request.cpp
index f689517ab5..5ec08197b0 100644
--- a/src/platform/request.cpp
+++ b/src/platform/request.cpp
@@ -1,13 +1,13 @@
#include <llmr/platform/request.hpp>
#include <llmr/platform/platform.hpp>
#include <llmr/util/std.hpp>
-#include <uv.h>
+#include <llmr/util/uv.hpp>
using namespace llmr::platform;
Request::Request(const std::string &url,
std::function<void(Response *)> callback,
- uv_loop_t *loop)
+ std::shared_ptr<uv::loop> loop)
: url(url),
res(std::make_unique<Response>(callback)),
cancelled(false),
@@ -20,7 +20,7 @@ Request::Request(const std::string &url,
// create an actual work request that is attached to the default loop.
async = new uv_async_t();
async->data = new std::unique_ptr<Response>();
- uv_async_init(loop, async, complete);
+ uv_async_init(**loop, async, complete);
}
}