mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Make new timeout code lock-safe on Qt 4.2. Oops.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@488 05730e5d-ab1b-0410-a4ac-84af385074fa
This commit is contained in:
parent
77cf9320c9
commit
be21e2871a
@ -426,13 +426,18 @@ void Server::message(QByteArray &qbaMsg, Connection *cCon) {
|
||||
|
||||
|
||||
void Server::checkTimeout() {
|
||||
QWriteLocker wl(&qrwlConnections);
|
||||
QList<Connection *> qlClose;
|
||||
|
||||
qrwlConnections.lockForRead();
|
||||
foreach(Connection *c, qmConnections) {
|
||||
if (c->activityTime() > (g_sp.iTimeout * 1000)) {
|
||||
log(QLatin1String("Timeout"), c);
|
||||
c->disconnect();
|
||||
qlClose.append(c);
|
||||
}
|
||||
}
|
||||
qrwlConnections.unlock();
|
||||
foreach(Connection *c, qlClose)
|
||||
c->disconnect();
|
||||
}
|
||||
|
||||
void Server::emitPacket(Message *msg) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user