[RPC] remove the option of having multiple timer interfaces

This commit is contained in:
Jonas Schnelli
2016-01-08 11:03:52 +01:00
committed by lateminer
parent f63fb94ab7
commit 3d541d041c
4 changed files with 25 additions and 17 deletions

View File

@@ -231,7 +231,7 @@ bool StartHTTPRPC()
assert(EventBase());
httpRPCTimerInterface = new HTTPRPCTimerInterface(EventBase());
RPCRegisterTimerInterface(httpRPCTimerInterface);
RPCSetTimerInterface(httpRPCTimerInterface);
return true;
}
@@ -245,7 +245,7 @@ void StopHTTPRPC()
LogPrint("rpc", "Stopping HTTP RPC server\n");
UnregisterHTTPHandler("/", true);
if (httpRPCTimerInterface) {
RPCUnregisterTimerInterface(httpRPCTimerInterface);
RPCUnsetTimerInterface(httpRPCTimerInterface);
delete httpRPCTimerInterface;
httpRPCTimerInterface = 0;
}