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