diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-01-08 10:11:25 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-01-08 11:15:00 +0100 |
commit | db198d51a651086744871c972637f3856675a2ed (patch) | |
tree | 8b74381bfe25d5399cce59943ac954be7de9ab43 | |
parent | b1cf0058d9b3d3e218f1dc31ee688e5beb21f573 (diff) |
Fix RPCTimerInterface ordering issue
Dispatching a QThread from a non Qt thread is not allowed. Always use the HTTPRPCTimerInterface (non QT) to dispatch RPCRunLater threads.
-rw-r--r-- | src/rpcserver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index bc419d14d9..de60bb6b1e 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -563,7 +563,7 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6 if (timerInterfaces.empty()) throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); deadlineTimers.erase(name); - RPCTimerInterface* timerInterface = timerInterfaces[0]; + RPCTimerInterface* timerInterface = timerInterfaces.back(); LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name()); deadlineTimers.insert(std::make_pair(name, boost::shared_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000)))); } |