Merge pull request #7318

daa8da2 Backport: quickfix for RPC timer interface problem (Jonas Schnelli)
This commit is contained in:
Wladimir J. van der Laan 2016-01-08 17:33:50 +01:00
commit 9265e89a77
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6
if (timerInterfaces.empty()) if (timerInterfaces.empty())
throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC");
deadlineTimers.erase(name); 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()); 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)))); deadlineTimers.insert(std::make_pair(name, boost::shared_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000))));
} }