mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
cluster/zeromq: Move log_push creation to DoInit()
The log_push socket should be affected by the IPV6 option, so need to delay its creation a bit.
This commit is contained in:
parent
a22837536d
commit
a20a2fe6e0
1 changed files with 3 additions and 4 deletions
|
@ -72,10 +72,8 @@ constexpr DebugFlag operator&(uint8_t x, DebugFlag y) { return static_cast<Debug
|
|||
|
||||
ZeroMQBackend::ZeroMQBackend(std::unique_ptr<EventSerializer> es, std::unique_ptr<LogSerializer> ls,
|
||||
std::unique_ptr<detail::EventHandlingStrategy> ehs)
|
||||
: ThreadedBackend("ZeroMQ", std::move(es), std::move(ls), std::move(ehs)) {
|
||||
log_push = zmq::socket_t(ctx, zmq::socket_type::push);
|
||||
main_inproc = zmq::socket_t(ctx, zmq::socket_type::pair);
|
||||
}
|
||||
: ThreadedBackend("ZeroMQ", std::move(es), std::move(ls), std::move(ehs)),
|
||||
main_inproc(zmq::socket_t(ctx, zmq::socket_type::pair)) {}
|
||||
|
||||
ZeroMQBackend::~ZeroMQBackend() {
|
||||
try {
|
||||
|
@ -163,6 +161,7 @@ void ZeroMQBackend::DoTerminate() {
|
|||
bool ZeroMQBackend::DoInit() {
|
||||
xsub = zmq::socket_t(ctx, zmq::socket_type::xsub);
|
||||
xpub = zmq::socket_t(ctx, zmq::socket_type::xpub);
|
||||
log_push = zmq::socket_t(ctx, zmq::socket_type::push);
|
||||
log_pull = zmq::socket_t(ctx, zmq::socket_type::pull);
|
||||
child_inproc = zmq::socket_t(ctx, zmq::socket_type::pair);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue