Interface SafelyCloseConnectionOptions

An object that contains an AbortSignal as the optional signal property.

Example

const controller = new AbortController()

aLongRunningOperation({
signal: controller.signal
})

// later

controller.abort()
interface SafelyCloseConnectionOptions {
    closableProtocols?: string[];
    signal?: AbortSignal;
}

Hierarchy (view full)

Properties

closableProtocols?: string[]

Only close the stream if it either has no protocol streams open or only ones in this list.

Default

['/ipfs/id/1.0.0']
signal?: AbortSignal