In Irc::Server::clientHandler() you are creating a socket that runs out of scope immediately due to the use of boost's shared pointer.
In Irc::Server::clientHandler() you are creating a socket that runs out of scope immediately due to the use of boost's shared pointer.
yeah, it was stored in its pointer in the class but now i removed it for some reason, is there anything to do else than storing it?
@Edit: still same thing after storing it again.
thanks for ur help
How are you "storing" the socket, by the way? Oh, and another thing. I doubt you can listen with one socket on multiple ports.
the listen on multi ports doesn't work well thats not the problem. I tried storing it in a vector/map or just Client* m_client; in a private slot in the class not a Qt slot, what else can i do?
yeah, and it was working before with it
Well the code is that uses it is not correct. Of course you can continue this path and wonder why your connections break or get rid of the smart pointer which is completely useless here. You get ownership of the socket so nobody is going to delete it behind your back.
this has been fixed. boost shared pointers ftw
Bookmarks