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
Fix disconnect issue on Windows #846
Conversation
WSAGetLastError should be invoked right after Windows sockets functions.
libcaf_io/src/tcp.cpp
Outdated
CAF_LOG_DEBUG(CAF_ARG(len) << CAF_ARG(fd) << CAF_ARG(sres)); | ||
if (is_error(sres, true)) | ||
if (is_error(sres, true)) { | ||
CAF_LOG_ERROR("send failed:" << last_socket_error_as_string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@v2nero would you mind double-checking whether this PR fixes the issues you've reported? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
simple_broker works with CAF_LOG_LEVEL=TRACE with your changes. This is the only case I tested before. |
Thanks for taking the time and testing the patch! |
WSAGetLastError should be invoked right after Windows sockets functions. Addresses the issue raised in #837.