working with most tests on twisted on py33/34
This commit is contained in:
@@ -1944,8 +1944,7 @@ class WebSocketProtocol(object):
|
|||||||
#
|
#
|
||||||
if self.autoPingPending:
|
if self.autoPingPending:
|
||||||
try:
|
try:
|
||||||
p = payload.decode('utf8')
|
if payload == self.autoPingPending:
|
||||||
if p == self.autoPingPending:
|
|
||||||
if self.debugCodePaths:
|
if self.debugCodePaths:
|
||||||
self.factory._log("Auto ping/pong: received pending pong for auto-ping/pong")
|
self.factory._log("Auto ping/pong: received pending pong for auto-ping/pong")
|
||||||
|
|
||||||
@@ -2094,9 +2093,9 @@ class WebSocketProtocol(object):
|
|||||||
|
|
||||||
self.autoPingPendingCall = None
|
self.autoPingPendingCall = None
|
||||||
|
|
||||||
self.autoPingPending = newid(self.autoPingSize)
|
self.autoPingPending = newid(self.autoPingSize).encode('utf8')
|
||||||
|
|
||||||
self.sendPing(self.autoPingPending.encode('utf8'))
|
self.sendPing(self.autoPingPending)
|
||||||
|
|
||||||
if self.autoPingTimeout:
|
if self.autoPingTimeout:
|
||||||
if self.debugCodePaths:
|
if self.debugCodePaths:
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ if os.environ.get('USE_TWISTED', False):
|
|||||||
"""
|
"""
|
||||||
auto-ping with correct reply cancels timeout
|
auto-ping with correct reply cancels timeout
|
||||||
"""
|
"""
|
||||||
if True:
|
if False:
|
||||||
self.proto.debug = True
|
self.proto.debug = True
|
||||||
self.proto.factory._log = print
|
self.proto.factory._log = print
|
||||||
self.proto.debugCodePaths = True
|
self.proto.debugCodePaths = True
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ except ImportError:
|
|||||||
|
|
||||||
def process(self, data):
|
def process(self, data):
|
||||||
dlen = len(data)
|
dlen = len(data)
|
||||||
print(data)
|
|
||||||
payload = array('B', data)
|
payload = array('B', data)
|
||||||
msk = self.mskarray[self.ptr & 3]
|
msk = self.mskarray[self.ptr & 3]
|
||||||
for k in xrange(dlen):
|
for k in xrange(dlen):
|
||||||
|
|||||||
Reference in New Issue
Block a user