aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <[email protected]>2016-01-08 10:11:25 +0100
committerJonas Schnelli <[email protected]>2016-01-08 11:15:00 +0100
commitdb198d51a651086744871c972637f3856675a2ed (patch)
tree8b74381bfe25d5399cce59943ac954be7de9ab43 /src/rpcserver.cpp
parentMerge pull request #7298 (diff)
downloaddiscoin-db198d51a651086744871c972637f3856675a2ed.tar.xz
discoin-db198d51a651086744871c972637f3856675a2ed.zip
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.
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r--src/rpcserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index bc419d14d..de60bb6b1 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))));
}