Open nonlin-lin-chaos-order-etc-etal opened 1 month ago
bridge_gateway.dart:54
is:
BridgeGateway(this._storage, this._bridgeUrl, this._sessionId, this._listener,
this._errorsListener) {
resolve = Completer();
}
Future<void> registerSession() async {
if (_isClosed) {
return;
}
final bridgeBase = _bridgeUrl;
var bridgeUrl = '$bridgeBase/$ssePath?client_id=$_sessionId';
final lastEventId = await _storage.getItem(key: IStorage.keyLastEventId);
if (lastEventId != null) {
bridgeUrl += '&last_event_id=$lastEventId';
}
logger.d('Bridge url -> $bridgeUrl');
if (_eventSource != null) {
_eventSource!.close();
}
_eventSource = EventSource(bridgeUrl);
_eventSource!.onError.listen(_errorsHandler);
_eventSource!.onOpen.listen((_) {
resolve.complete(true); // HERE IS THE LINE 54
});
JS console:
https://bridge.tonapi.io/bridge/events?client_id=c32a4e5a392a96fa301296d2b7a7eba1053e0f981e2a2217692591c0e250e74a&last_event_id=1728325588459596 has a response.body:
Events
event: heartbeat
continue to arrive while Google Chrome has the page open