IMAP Resource: handle disconnection before initial "OK" from server
Summary:
1b79b4b in kimap makes connectionLost useful again, as the best way
to detect that we managed to connect (so the server actually exists and is
(or was) reachable) and then lost connection. Use that instead of the state change
to distinguish from the wrong hostname case (where we don't want to retry, we'd loop
forever doing that).
Test Plan:
Expand existing unittest to test 3 different cases of connection lost,
all after the initial connect. The next method (shouldNotifyFailureToConnect)
ensures that the "wrong hostname" case still works.
Reviewers: knauss, dvratil, ervin
Reviewed By: dvratil
Subscribers: KDE PIM
Tags: KDE PIM
Differential Revision: https://phabricator.kde.org/D12418