aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-01-08 10:11:25 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2016-01-08 11:15:00 +0100
commitdb198d51a651086744871c972637f3856675a2ed (patch)
tree8b74381bfe25d5399cce59943ac954be7de9ab43 /src
parentb1cf0058d9b3d3e218f1dc31ee688e5beb21f573 (diff)
downloadbitcoin-db198d51a651086744871c972637f3856675a2ed.tar.xz
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')
-rw-r--r--src/rpcserver.cpp2
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))));
}