Browse Source

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.
tags/v1.12.90
Pierre Ossman 1 year ago
parent
commit
e46d2c36d8
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      common/rfb/CConnection.cxx

+ 10
- 0
common/rfb/CConnection.cxx View File

@@ -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;

Loading…
Cancel
Save