diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-10-18 12:39:38 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-10-18 12:42:23 (GMT) |
commit | cc3828e7f77074064f92ddf306765da0780fa823 (patch) | |
tree | 6d819df0c04fb20c5a740f7d1f0921a333b0947b /Swiften | |
parent | d66625d2118fdcfa24e6426588ecdeb102a42966 (diff) | |
download | swift-contrib-cc3828e7f77074064f92ddf306765da0780fa823.zip swift-contrib-cc3828e7f77074064f92ddf306765da0780fa823.tar.bz2 |
Use the oldest error when closing streams.
Stops new errors overwriting cert validation errors and preventing
Swift from prompting the user to trust the cert.
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index 791ee75..fd001a1 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -420,7 +420,9 @@ void ClientSession::finishSession(Error::Type error) { void ClientSession::finishSession(boost::shared_ptr<Swift::Error> error) { state = Finishing; - error_ = error; + if (!error_) { + error_ = error; + } assert(stream->isOpen()); if (stanzaAckResponder_) { stanzaAckResponder_->handleAckRequestReceived(); |