Please sign in to comment.
Fix auto-reconnect behavior when kicked or banned.
This commit fixes a regression in Mumble's auto-reconnect functionality which made clients auto-reconnect to a server even after being kicked or banned. Historically, Mumble has not worked this way. The new auto-reconnect behavior showed itself due to a bug fix in Qt (Qt 4 commit: 488cb66, Qt 5 commit: e145b67). The Qt change fixes QSslSocket such that a remote close (at the TLS level) properly emits a QAbstractSocket::RemoteHostClosedError error. Prior to this change, Mumble would simply treat a TLS-level remote close as a client-initiated disconnect, and therefore not attempt to auto-reconnect. With this new and correct QSslSocket behavior in place, Mumble's previous handling of auto-reconnect is insufficient. Since a kick/ban now results in a TLS-level remote close, the client has no way to determine whether a given remote close error is due to a kick/ban, or due to the server shutting down. Note that a server shutdown has always, even before this change, emitted a QAbstractSocket::RemoteHostClosedError error. This is seemingly because a server shutdown closes the underlying TCP socket instead of sending a TLS-level close notification. To fix the situation, this commit adds a flag to MainWindow that signals whether the client should try to attempt an automatic reconnect if it gets disconnected. When the client is kicked or banned, this flag unset. This restores Mumble's previous auto-reconnect behavior when kicked or banned from a server. Fixes #1189
- Loading branch information...
Showing with 7 additions and 1 deletion.