message loop... :(
Starting core with --sputdev will print a warning whenever a message is received twice from the socket..
That will make crystal-clear if the bug is in our handler or in QTcpSocket.
NOTE: Starting core with --sputdev currently has no other side-effects, don't try this with the client though :)
void NetworkConnection::socketHasData() {
while(socket.canReadLine()) {
QByteArray s = socket.readLine().trimmed();
+ // FIXME debug
+ if(Global::SPUTDEV && s == lastMsgReceived) {
+ qWarning() << "NetworkConnection::socketHasData(): Message repeated! -> loop?";
+ }
+ lastMsgReceived = s;
ircServerHandler()->handleServerMsg(s);
}
}
bool _previousConnectionAttemptFailed;
int _lastUsedServerlistIndex;
+ QByteArray lastMsgReceived; // FIXME debug
+
class ParseError : public Exception {
public:
ParseError(QString cmd, QString prefix, QStringList params);