Closed adamczykm closed 2 years ago
So the problem is that we don't close our websockets after execution. We need to support both websocket reuse and parallel execution, so there should be an option to not close the websockets after a runContract
call, but by default we should do that.
The quick-and-dirty solution would be to add these to runQueryM
, but it will make impossible to reuse the websockets:
liftEffect $ _wsClose $ underlyingWebSocket cfg.ogmiosWs
liftEffect $ _wsClose $ underlyingWebSocket cfg.datumCacheWs
I'm working on QueryM reorganization.
If a CTL client calls multiple contracts at once, it causes existing WebSockets to break. Any subsequent calls will fail. I can provide more details and a way to replicate the bug after the next weekend. ( meanwhile @klntsky can add some conjectures )