Skip to main content
abortTestWebsocketConnectivity() Stops an in-progress testWebsocketConnectivity() test before it completes. The original testWebsocketConnectivity() Promise resolves immediately with partial results — containing information about the regions that were tested up to the abort point — and a test-completed event fires. If no test is in progress, this method does nothing.

Return value

void

Example

const resultPromise = call.testWebsocketConnectivity();

// Abort early if the user cancels
call.abortTestWebsocketConnectivity();

const results = await resultPromise;
console.log(results.result); // 'aborted'
console.log(results.abortedRegions); // regions that were not yet tested when aborted

See also