kopia lustrzana https://github.com/cirospaciari/socketify.py
remove unecessary overhead from event loop in WSGI and ASGI
rodzic
999d4914e7
commit
9b859b9266
|
@ -498,7 +498,7 @@ def asgi(ssl, response, info, user_data, aborted):
|
|||
|
||||
class _ASGI:
|
||||
def __init__(self, app, options=None, websocket=True, websocket_options=None, task_factory_max_items=100_000):
|
||||
self.server = App(options)
|
||||
self.server = App(options, task_factory_max_items=0)
|
||||
self.SERVER_PORT = None
|
||||
self.SERVER_HOST = ""
|
||||
self.SERVER_SCHEME = "https" if self.server.options else "http"
|
||||
|
|
|
@ -169,7 +169,7 @@ def is_asgi(module):
|
|||
|
||||
class _WSGI:
|
||||
def __init__(self, app, options=None, websocket=None, websocket_options=None, task_factory_max_items=100_000):
|
||||
self.server = App(options)
|
||||
self.server = App(options, task_factory_max_items=0)
|
||||
self.SERVER_HOST = None
|
||||
self.SERVER_PORT = None
|
||||
self.SERVER_WS_SCHEME = "wss" if self.server.options else "ws"
|
||||
|
|
Ładowanie…
Reference in New Issue