Getting the above exception in the following scenario -
Connected to a stream having multiple events, after receiving first event, created another connection having a single event, once the event is received ideally we should receive the pending event from the first stream, however getting this exception and not receiving the pending event.
Below is the code -
EventFlux.instance.connect(EventFluxConnectionType.post, ,
header: header,
body: body,
onSuccessCallback: (EventFluxResponse? response) {
response?.stream?.listen(
(data) {
}
);
},
autoReconnect: true,
reconnectConfig: ReconnectConfig(
mode: ReconnectMode.linear,
reconnectHeader: () async {
if (_lastEventId != null) {
header['Last-Event-ID'] = _lastEventId!;
}
return header;
},
onReconnect: () {
},
),
onConnectionClose: () {
},
onError: (error) {
});