Fix stuck Goggles on websocket reconnect

This commit is contained in:
Mononaut
2024-03-08 16:47:15 +00:00
parent 29bbb922c5
commit dde6719306
4 changed files with 5 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ export class WebsocketService {
this.startMultiTrackTransaction(this.trackingTxId);
}
if (this.isTrackingMempoolBlock) {
this.startTrackMempoolBlock(this.trackingMempoolBlock);
this.startTrackMempoolBlock(this.trackingMempoolBlock, true);
}
if (this.isTrackingRbf) {
this.startTrackRbf(this.isTrackingRbf);
@@ -197,9 +197,9 @@ export class WebsocketService {
this.websocketSubject.next({ 'track-asset': 'stop' });
}
startTrackMempoolBlock(block: number) {
startTrackMempoolBlock(block: number, force: boolean = false) {
// skip duplicate tracking requests
if (this.trackingMempoolBlock !== block) {
if (force || this.trackingMempoolBlock !== block) {
this.websocketSubject.next({ 'track-mempool-block': block });
this.isTrackingMempoolBlock = true;
this.trackingMempoolBlock = block;