MCPcopy Index your code
hub / github.com/socketio/socket.io / _onerror

Method _onerror

lib/socket.ts:726–732  ·  view source on GitHub ↗

* Handles a client error. * * @private

(err: Error)

Source from the content-addressed store, hash-verified

724 * @private
725 */
726 _onerror(err: Error): void {
727 // FIXME the meaning of the "error" event is overloaded:
728 // - it can be sent by the client (`socket.emit("error")`)
729 // - it can be emitted when the connection encounters an error (an invalid packet for example)
730 // - it can be emitted when a packet is rejected in a middleware (`socket.use()`)
731 this.emitReserved("error", err);
732 }
733
734 /**
735 * Called upon closing. Called by `Client`.

Callers 2

dispatchMethod · 0.95
onerrorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected