Index: tests/test-pokeravatar.py.in
===================================================================
--- tests/test-pokeravatar.py.in	(revision 6456)
+++ tests/test-pokeravatar.py.in	(working copy)
@@ -3948,7 +3948,8 @@
             d = defer.Deferred()
             def getOrCreateRestClientMockup(resthost, game_id):
                 clients[game_id] = getOrCreateRestClient(resthost, game_id)
-                clients[game_id].sendPacket = lambda packet, data: d
+                clients[game_id].sendPacketData = lambda data: d
+                clients[game_id].pendingLongPoll = True
                 return clients[game_id]
             avatar.getOrCreateRestClient = getOrCreateRestClientMockup
             def disconnectAvatar(arg):
@@ -3961,7 +3962,7 @@
             r.addCallback(lambda arg: self.assertEquals(None, clients[2].timer))
             def f(x): PokerRestClient.DEFAULT_LONG_POLL_FREQUENCY = -1
             r.addCallback(f)
-            d.callback([PacketPing()])
+            d.callback('[{ "type": "PacketPing" }]')
             return d
         d.addCallback(handleDistributedPacket)
         return d
@@ -4852,7 +4853,7 @@
 ##############################################################################
 def Run():
     loader = runner.TestLoader()
-#    loader.methodPrefix = "test08_1"
+#    loader.methodPrefix = "test82"
     suite = loader.suiteFactory()
     suite.addTest(loader.loadClass(PokerAvatarLocaleTestCase))
     suite.addTest(loader.loadClass(PokerAvatarTestCase))
Index: pokernetwork/pokerrestclient.py
===================================================================
--- pokernetwork/pokerrestclient.py	(revision 6456)
+++ pokernetwork/pokerrestclient.py	(working copy)
@@ -146,8 +146,9 @@
         self.timer = None
         
     def scheduleLongPoll(self, delta):
-        self.clearTimeout()
-        self.timer = reactor.callLater(max(self.minLongPollFrequency, self.longPollFrequency - delta), self.longPoll)
+        if self.longPollFrequency > 0:        
+            self.clearTimeout()
+            self.timer = reactor.callLater(max(self.minLongPollFrequency, self.longPollFrequency - delta), self.longPoll)
 
     def longPoll(self):
         if self.longPollFrequency > 0:
Index: pokernetwork/pokeravatar.py
===================================================================
--- pokernetwork/pokeravatar.py	(revision 6456)
+++ pokernetwork/pokeravatar.py	(working copy)
@@ -1272,6 +1272,7 @@
         self.logout()
         for key, restclient in self.game_id2rest_client.iteritems():
             restclient.clearTimeout()
+            restclient.longPollFrequency = -1
         self.game_id2rest_client = {}
 
     def getUserInfo(self, serial):
