mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 01:30:20 +00:00
Remove check for if request is finished in EventListener.get_event since websockets finish early
This commit is contained in:
parent
7d0c77409b
commit
34ddaa646b
3 changed files with 2 additions and 8 deletions
1
changelog/59183.fixed
Normal file
1
changelog/59183.fixed
Normal file
|
@ -0,0 +1 @@
|
|||
Fixed saltnado websockets disconnecting immediately
|
|
@ -332,13 +332,6 @@ class EventListener:
|
|||
"""
|
||||
Get an event (asynchronous of course) return a future that will get it later
|
||||
"""
|
||||
# if the request finished, no reason to allow event fetching, since we
|
||||
# can't send back to the client
|
||||
if request._finished:
|
||||
future = Future()
|
||||
future.set_exception(TimeoutException())
|
||||
return future
|
||||
|
||||
future = Future()
|
||||
if callback is not None:
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class Request:
|
|||
__slots__ = ("_finished",)
|
||||
|
||||
def __init__(self):
|
||||
self._finished = False
|
||||
self._finished = True
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
Loading…
Add table
Reference in a new issue