projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve flood control a bit
[quassel.git]
/
src
/
core
/
corenetwork.cpp
diff --git
a/src/core/corenetwork.cpp
b/src/core/corenetwork.cpp
index
dedd819
..
b89c403
100644
(file)
--- a/
src/core/corenetwork.cpp
+++ b/
src/core/corenetwork.cpp
@@
-192,6
+192,7
@@
void CoreNetwork::disconnectFromIrc(bool requested, const QString &reason, bool
_autoReconnectCount = 0; // prohibiting auto reconnect
}
disablePingTimeout();
_autoReconnectCount = 0; // prohibiting auto reconnect
}
disablePingTimeout();
+ _msgQueue.clear();
IrcUser *me_ = me();
if(me_) {
IrcUser *me_ = me();
if(me_) {
@@
-327,10
+328,10
@@
void CoreNetwork::socketInitialized() {
}
// TokenBucket to avoid sending too much at once
}
// TokenBucket to avoid sending too much at once
- _message
sPerSecond = 1;
+ _message
Delay = 2200; // this seems to be a safe value (2.2 seconds delay)
_burstSize = 5;
_burstSize = 5;
- _tokenBucket =
5
; // init with a full bucket
- _tokenBucketTimer.start(_message
sPerSecond * 1000
);
+ _tokenBucket =
_burstSize
; // init with a full bucket
+ _tokenBucketTimer.start(_message
Delay
);
if(!server.password.isEmpty()) {
putRawLine(serverEncode(QString("PASS %1").arg(server.password)));
if(!server.password.isEmpty()) {
putRawLine(serverEncode(QString("PASS %1").arg(server.password)));
@@
-341,6
+342,7
@@
void CoreNetwork::socketInitialized() {
void CoreNetwork::socketDisconnected() {
disablePingTimeout();
void CoreNetwork::socketDisconnected() {
disablePingTimeout();
+ _msgQueue.clear();
_autoWhoCycleTimer.stop();
_autoWhoTimer.stop();
_autoWhoCycleTimer.stop();
_autoWhoTimer.stop();