mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
[depends, zmq, doc] upgrade zeromq to 4.2.5 and avoid deprecated zeromq api functions
This commit is contained in:
@@ -81,10 +81,14 @@ CZMQNotificationInterface* CZMQNotificationInterface::Create()
|
||||
// Called at startup to conditionally set up ZMQ socket(s)
|
||||
bool CZMQNotificationInterface::Initialize()
|
||||
{
|
||||
int major = 0, minor = 0, patch = 0;
|
||||
zmq_version(&major, &minor, &patch);
|
||||
LogPrint(BCLog::ZMQ, "zmq: version %d.%d.%d\n", major, minor, patch);
|
||||
|
||||
LogPrint(BCLog::ZMQ, "zmq: Initialize notification interface\n");
|
||||
assert(!pcontext);
|
||||
|
||||
pcontext = zmq_init(1);
|
||||
pcontext = zmq_ctx_new();
|
||||
|
||||
if (!pcontext)
|
||||
{
|
||||
@@ -127,7 +131,7 @@ void CZMQNotificationInterface::Shutdown()
|
||||
LogPrint(BCLog::ZMQ, " Shutdown notifier %s at %s\n", notifier->GetType(), notifier->GetAddress());
|
||||
notifier->Shutdown();
|
||||
}
|
||||
zmq_ctx_destroy(pcontext);
|
||||
zmq_ctx_term(pcontext);
|
||||
|
||||
pcontext = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user