diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-09-10 16:57:24 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-10-09 13:37:08 +0200 |
commit | 56b3460aa318b650f12833ba119fa6decb930148 (patch) | |
tree | 5f0e4dea4d3b4130b63179a86cf2a4257cf3a33a /common/rdr/TLSInStream.cxx | |
parent | 6029d50080bb795524d6cefe8d6b4b9b88475bdd (diff) | |
download | tigervnc-56b3460aa318b650f12833ba119fa6decb930148.tar.gz tigervnc-56b3460aa318b650f12833ba119fa6decb930148.zip |
Consistently use SocketException for socket errors
The behaviour is not consistent as Windows doesn't use errno for socket
errors, but Unix systems do. Always use the same exception to keep
things somewhat sane.
Diffstat (limited to 'common/rdr/TLSInStream.cxx')
-rw-r--r-- | common/rdr/TLSInStream.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rdr/TLSInStream.cxx b/common/rdr/TLSInStream.cxx index d13cee1f..f8f4fcf9 100644 --- a/common/rdr/TLSInStream.cxx +++ b/common/rdr/TLSInStream.cxx @@ -56,10 +56,10 @@ ssize_t TLSInStream::pull(gnutls_transport_ptr_t str, void* data, size_t size) in->readBytes((uint8_t*)data, size); } catch (EndOfStream&) { return 0; - } catch (SystemException &e) { + } catch (SocketException& e) { vlog.error("Failure reading TLS data: %s", e.str()); gnutls_transport_set_errno(self->session, e.err); - self->saved_exception = new SystemException(e); + self->saved_exception = new SocketException(e); return -1; } catch (Exception& e) { vlog.error("Failure reading TLS data: %s", e.str()); |