diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-11-07 13:45:34 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-11-07 13:45:34 +0100 |
commit | e46d2c36d82c7e8f385ead5947446d7161b9aaf9 (patch) | |
tree | a9d939cb5df6511adaffdb4d63548a5383e455ce /common/rfb/CConnection.cxx | |
parent | dd8d208e8d1e8852f6f8f16dbac81e461a71dd99 (diff) | |
download | tigervnc-e46d2c36d82c7e8f385ead5947446d7161b9aaf9.tar.gz tigervnc-e46d2c36d82c7e8f385ead5947446d7161b9aaf9.zip |
Flush decoder errors on close()
We don't want any stray exceptions as we are cleaning up, so handle any
still pending decoder errors by just logging them. We are already
shutting down so there is no need to abort the connection here.
Diffstat (limited to 'common/rfb/CConnection.cxx')
-rw-r--r-- | common/rfb/CConnection.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx index 675b49d6..396b48b3 100644 --- a/common/rfb/CConnection.cxx +++ b/common/rfb/CConnection.cxx @@ -388,6 +388,16 @@ void CConnection::close() { state_ = RFBSTATE_CLOSING; + /* + * We're already shutting down, so just log any pending decoder + * problems + */ + try { + decoder.flush(); + } catch (rdr::Exception& e) { + vlog.error("%s", e.str()); + } + setFramebuffer(NULL); delete csecurity; csecurity = NULL; |