| Index: sync/tools/testserver/xmppserver.py
|
| diff --git a/sync/tools/testserver/xmppserver.py b/sync/tools/testserver/xmppserver.py
|
| index 0b32933c52a0065d1a1f351b19fa4d728b9fcd1f..3f7c7d05a769bf652401e6f611a5079b7a0905eb 100644
|
| --- a/sync/tools/testserver/xmppserver.py
|
| +++ b/sync/tools/testserver/xmppserver.py
|
| @@ -575,6 +575,14 @@ class XmppServer(asyncore.dispatcher):
|
| def SetAuthenticated(self, auth_valid):
|
| self._authenticated = auth_valid
|
|
|
| + # We check authentication only when establishing new connections. We close
|
| + # all existing connections here to make sure previously connected clients
|
| + # pick up on the change. It's a hack, but it works well enough for our
|
| + # purposes.
|
| + if not self._authenticated:
|
| + for connection in self._handshake_done_connections:
|
| + connection.close()
|
| +
|
| def GetAuthenticated(self):
|
| return self._authenticated
|
|
|
|
|