| Index: sync/tools/testserver/xmppserver.py
|
| diff --git a/sync/tools/testserver/xmppserver.py b/sync/tools/testserver/xmppserver.py
|
| index f9599c0cd090245c93e6cab61d0f477e9cd2eb8a..e3fda9f14fe25b0a2ee9f22d63e69e1f8738b612 100644
|
| --- a/sync/tools/testserver/xmppserver.py
|
| +++ b/sync/tools/testserver/xmppserver.py
|
| @@ -574,6 +574,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
|
|
|
|
|