mirror of
				https://github.com/django/daphne.git
				synced 2025-10-31 07:47:25 +03:00 
			
		
		
		
	
							parent
							
								
									ca61162129
								
							
						
					
					
						commit
						2b6f153616
					
				|  | @ -1,3 +1,7 @@ | |||
| * Fixed a bug where ``send`` passed to applications wasn't a true async | ||||
|   function but a lambda wrapper, preventing it from being used with | ||||
|   ``asgiref.sync.async_to_sync()``. | ||||
| 
 | ||||
| 3.0.1 (2020-11-12) | ||||
| ------------------ | ||||
| 
 | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ else: | |||
| import logging | ||||
| import time | ||||
| from concurrent.futures import CancelledError | ||||
| from functools import partial | ||||
| 
 | ||||
| from twisted.internet import defer, reactor | ||||
| from twisted.internet.endpoints import serverFromString | ||||
|  | @ -203,7 +204,7 @@ class Server: | |||
|         application_instance = self.application( | ||||
|             scope=scope, | ||||
|             receive=input_queue.get, | ||||
|             send=lambda message: self.handle_reply(protocol, message), | ||||
|             send=partial(self.handle_reply, protocol), | ||||
|         ) | ||||
|         # Run it, and stash the future for later checking | ||||
|         if protocol not in self.connections: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user