polkadot-js/api

View on GitHub
packages/rpc-core/src/util/refCountDelay.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function refCountDelay has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function refCountDelay <T> (delay = 1750): MonoTypeOperatorFunction<T> {
  return (source: Observable<T>): Observable<T> => {
    // state: 0 = disconnected, 1 = disconnecting, 2 = connecting, 3 = connected
    let [state, refCount, connection, scheduler] = [0, 0, Subscription.EMPTY, Subscription.EMPTY];

Severity: Minor
Found in packages/rpc-core/src/util/refCountDelay.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status