MCPcopy Create free account
hub / github.com/nodejs/node / onError

Method onError

deps/undici/src/lib/core/socks5-client.js:122–127  ·  view source on GitHub ↗

* Handle socket errors

(err)

Source from the content-addressed store, hash-verified

120 * Handle socket errors
121 */
122 onError (err) {
123 debug('socket error', err)
124 this.state = STATES.ERROR
125 this.emit('error', err)
126 this.destroy()
127 }
128
129 /**
130 * Handle socket close

Callers 3

onDataMethod · 0.95
onResponseErrorMethod · 0.45
[kDispatch]Method · 0.45

Calls 3

destroyMethod · 0.95
debugFunction · 0.50
emitMethod · 0.45

Tested by

no test coverage detected