Hi,
So I have a front-end including a vtkRemoteView connecting to a remote paraview server via wslink (based on the last code here vtk.js).
Everything works well on first visualisation, however when the customer closes the visu window, I need to close the connection cleanly.
So I call disconnect()
on the WSLinkClient
, then delete()
on the vtkRemoteView
.
Disconnect seems to work as for server, the client is disconnected (it logs INFO:root:client xxx disconnected
)
Thing is, if the user tries to re-connect to the server, visualisation doesn’t work and it generates errors like {code: -32099, message: 'RPC call viewport.image.push.original.size unsuccessful: connection not open'}
. Yet I recreate the remoteView and wsLinkClient. But it seems there is some previous connection that is kept. Is it some state in wslink/vtk-js?
Indeed in wslink’s session.js, model.ws.readyState
is 3; so it seems the old websocket is conserved. But I can’t find why, as it seems I recreate everything.
So maybe it’s because I don’t call the right destructors ?
is wslinkclient.disconnect()
on then remoteView.delete()
the appropriate calls to properly close a session?
Thanks in advance,