Skip to content

Commit

Permalink
Use custom loop to get additional exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Jan 3, 2024
1 parent b89d49d commit ccdc1ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ert/ensemble_evaluator/sync_ws_duplexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from websockets.datastructures import Headers
from websockets.typing import Data

from ert.async_utils import new_event_loop

from ._wait_for_evaluator import wait_for_evaluator


Expand Down Expand Up @@ -50,7 +52,7 @@ def __init__(
ssl_context = True if self._uri.startswith("wss") else None
self._ssl_context: Optional[Union[bool, ssl.SSLContext]] = ssl_context

self._loop = asyncio.new_event_loop()
self._loop = new_event_loop()
self._connection: asyncio.Task[None] = self._loop.create_task(self._connect())
self._ws: Optional[WebSocketClientProtocol] = None
self._loop_thread = threading.Thread(target=self._loop.run_forever)
Expand Down

0 comments on commit ccdc1ea

Please sign in to comment.