(
subscriptionId: string,
keepSubscription: boolean,
)
| 853 | } |
| 854 | |
| 855 | private clearSubscriptionData( |
| 856 | subscriptionId: string, |
| 857 | keepSubscription: boolean, |
| 858 | ) { |
| 859 | const hash = this.idToHash[subscriptionId]; |
| 860 | if (hash) { |
| 861 | delete this.idToHash[subscriptionId]; |
| 862 | const sub = this.subs.currentValue[hash]; |
| 863 | if (sub.state) { |
| 864 | this.sendRemove(sub.state, keepSubscription); |
| 865 | } |
| 866 | if (keepSubscription) { |
| 867 | this.subs.unloadKey(hash); |
| 868 | } else { |
| 869 | this.subs.updateInPlace((prev) => { |
| 870 | delete prev[hash]; |
| 871 | }); |
| 872 | } |
| 873 | if (sub) { |
| 874 | return sub; |
| 875 | } |
| 876 | } |
| 877 | } |
| 878 | |
| 879 | public onStartSyncError(msg: { |
| 880 | op: 'error'; |
no test coverage detected