Remove check for if request is finished in EventListener.get_event since websockets finish early

This commit is contained in:
MKLeb 2022-11-14 19:49:48 -05:00 committed by Megan Wilhite
parent 7d0c77409b
commit 34ddaa646b
3 changed files with 2 additions and 8 deletions

1
changelog/59183.fixed Normal file
View file

@ -0,0 +1 @@
Fixed saltnado websockets disconnecting immediately

View file

@ -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:

View file

@ -13,7 +13,7 @@ class Request:
__slots__ = ("_finished",)
def __init__(self):
self._finished = False
self._finished = True
@pytest.fixture