Skip to content
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

Fixed unexpected server disconnection due to SSL_ERROR_SYSCALL with e… #8

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ class Socket {
return Code::Memory;
case ETIMEDOUT:
return Code::Timeout;
case ECONNABORTED:
return Code::Cancel;
# if EAGAIN != EWOULDBLOCK
case EAGAIN:
# endif
case ECONNABORTED:
return Code::Cancel;
case EWOULDBLOCK:
case EINTR:
return Code::Retry;
Expand Down
3 changes: 3 additions & 0 deletions src/TLS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ ::Code SocketTLS::interpretLibCode(const int code, const bool processed, const b
case SSL_ERROR_WANT_WRITE:
return WaitOut;
case SSL_ERROR_SYSCALL:
if (ERR_get_error() == 0 && osErrorToCode(osError()) == mumble::Code::Retry) {
return Retry;
}
m_closed = true;

if (!processed) {
Expand Down