Closed alon-e closed 4 years ago
@alon-e apologies for the late reply, I must have missed notification.
It has been fixed over a week ago in https://github.com/tardis-dev/tardis-machine/commit/5d27737f9014ea81a414ca0c61bb028ff1b9b1db and released in v2.0.5
Mechanism has been changed to explicitly requesting 'synchronized' session for multiple connections by sending session=you-session-key
query string param.
WS session keys are used to aggregate connections (
key={$from}-{$to}
), whoever, if a connection is not closed nicely, it's impossible to reestablish a connection with the samefrom
andto
. also, the same goes for 2 different exchanges, not in the 5sec time-window before the session starts, this mechanism doesn't feel robust enough.to reproduce:
the same with another exchange, even if still first exchange still running properly.
the only way I could reconnect with the same from-to was by consuming all the data till the server hits
on_finished
https://github.com/tardis-dev/tardis-machine/blob/4031ada47aeb35cde550dae1fe41186555726fc2/src/ws/replay.ts#L29-L32