Open GoogleCodeExporter opened 9 years ago
Does this seem like a reasonable patch?
http://dpaste.com/0GKV9W6
if so, would you mind testing it?
Original comment by arvid.no...@gmail.com
on 7 Aug 2014 at 5:21
I tested it. The listen_on function returns correct error now. There is still
one problem though (IMO). The listen_on function returns the error but after
the m_udp_socket.bind even though the call to setup_listener also returns the
error. The thing is that setup_listener allocates the socket internally and
then returns the error. After the call to setup_listener there is a check if
the socket is valid "if (s.sock)" and it is pushed to the m_listen_sockets
which invalidates the check that you have added "if (m_listen_sockets.empty()
&& ec)" and prevents it to do early return in case of error.
Original comment by frea...@gmail.com
on 7 Aug 2014 at 1:29
Original issue reported on code.google.com by
frea...@gmail.com
on 4 Aug 2014 at 7:49