-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation at sock.close() at loop.timer #205
Comments
segv205.patch.txt |
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(). |
the 205_2n3.patch.txt |
part 2: exception at loop.start() part 3: socket is not removed from items_ via separate cb for close() * testcases for it
part 2: exception at loop.start() part 3: socket is not removed from items_ via separate cb for close() * testcases for it
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 <iostream.>
#include <memory.>
#include <unistd.h>
#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");
}`
The text was updated successfully, but these errors were encountered: