mirror of
				https://github.com/django/daphne.git
				synced 2025-10-31 15:57:25 +03:00 
			
		
		
		
	Fixed #28: Logging breaking bad WebSocket error messages
This commit is contained in:
		
							parent
							
								
									da3cce79d0
								
							
						
					
					
						commit
						6679b8dfdf
					
				|  | @ -104,7 +104,10 @@ class WebRequest(http.Request): | ||||||
|                 data += self.content.read() |                 data += self.content.read() | ||||||
|                 protocol.dataReceived(data) |                 protocol.dataReceived(data) | ||||||
|                 # Remove our HTTP reply channel association |                 # Remove our HTTP reply channel association | ||||||
|  |                 if hasattr(protocol, "reply_channel"): | ||||||
|                     logger.debug("Upgraded connection %s to WebSocket %s", self.reply_channel, protocol.reply_channel) |                     logger.debug("Upgraded connection %s to WebSocket %s", self.reply_channel, protocol.reply_channel) | ||||||
|  |                 else: | ||||||
|  |                     logger.debug("Connection %s did not get successful WS handshake.", self.reply_channel) | ||||||
|                 del self.factory.reply_protocols[self.reply_channel] |                 del self.factory.reply_protocols[self.reply_channel] | ||||||
|                 self.reply_channel = None |                 self.reply_channel = None | ||||||
|             # Boring old HTTP. |             # Boring old HTTP. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user