mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 01:32:31 +01:00
zmq: Fix due to invalid argument and multiple notifiers
This commit is contained in:
@@ -112,7 +112,8 @@ bool CZMQAbstractPublishNotifier::Initialize(void *pcontext)
|
|||||||
|
|
||||||
void CZMQAbstractPublishNotifier::Shutdown()
|
void CZMQAbstractPublishNotifier::Shutdown()
|
||||||
{
|
{
|
||||||
assert(psocket);
|
// Early return if Initialize was not called
|
||||||
|
if (!psocket) return;
|
||||||
|
|
||||||
int count = mapPublishNotifiers.count(address);
|
int count = mapPublishNotifiers.count(address);
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ class ZMQTest (BitcoinTestFramework):
|
|||||||
# Note that the publishing order is not defined in the documentation and
|
# Note that the publishing order is not defined in the documentation and
|
||||||
# is subject to change.
|
# is subject to change.
|
||||||
import zmq
|
import zmq
|
||||||
|
|
||||||
|
# Invalid zmq arguments don't take down the node, see #17185.
|
||||||
|
self.restart_node(0, ["-zmqpubrawtx=foo", "-zmqpubhashtx=bar"])
|
||||||
|
|
||||||
address = 'tcp://127.0.0.1:28332'
|
address = 'tcp://127.0.0.1:28332'
|
||||||
socket = self.ctx.socket(zmq.SUB)
|
socket = self.ctx.socket(zmq.SUB)
|
||||||
socket.set(zmq.RCVTIMEO, 60000)
|
socket.set(zmq.RCVTIMEO, 60000)
|
||||||
|
|||||||
Reference in New Issue
Block a user