Open pavel-orekhov opened 6 years ago
segv205.patch.txt fd==0 is valid fd. The patch suggested. Please test it.
There are two problems after previous patch:
Both problems are because after socket::close() socket::_socket is null and it misscompares with list of sockets at loop and at poller level.
It is required to save socket::_socket at SOCKET::close() till LOOP::flush_remove_later(). Is it right to add field void* socket::_saved_socket for this problem?
the 205_2n3.patch.txt suggested as a fix of mentioned problems.
I tried to reopen socket at timer's handler. It runs in endless recursion at remove() because socketfd=0 after close() and commonfd=0 too.
`#include
include
include
include "zmqpp.hpp"
int main(int argc, char* argv[]){ zmqpp::context zmqContext; zmqpp::loop loop; zmqpp::socket workerSock(zmqContext,zmqpp::socket_type::dealer); workerSock.connect("tcp://localhost:5555");
}`