X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.h;h=8d5f7201eb21e3e162d10615ff0b00d015898e09;hb=0063256bd1892d2bf3edc9acc597e9ab90152148;hp=d596c5380c17c37be925659c48ade627f7965e11;hpb=3966090a1e7093c417560f7ee13ab310215d9ccd;p=quassel.git diff --git a/src/core/corenetwork.h b/src/core/corenetwork.h index d596c538..8d5f7201 100644 --- a/src/core/corenetwork.h +++ b/src/core/corenetwork.h @@ -169,6 +169,17 @@ public slots: void disconnectFromIrc(bool requested = true, const QString &reason = QString(), bool withReconnect = false, bool forceImmediate = false); + /** + * Forcibly close the IRC server socket, waiting for it to close. + * + * Call CoreNetwork::disconnectFromIrc() first, allow the event loop to run, then if you need to + * be sure the network's disconencted (e.g. clean-up), call this. + * + * @param msecs Maximum time to wait for socket to close, in milliseconds. + * @return True if socket closes successfully; false if error occurs or timeout reached + */ + bool forceDisconnect(int msecs = 1000); + void userInput(BufferInfo bufferInfo, QString msg); /** @@ -372,6 +383,10 @@ private: bool _quitRequested; QString _quitReason; + bool _disconnectExpected; /// If true, connection is quitting, expect a socket close + // This avoids logging a spurious RemoteHostClosedError whenever disconnect is called without + // specifying a permanent (saved to core session) disconnect. + bool _previousConnectionAttemptFailed; int _lastUsedServerIndex;