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

Function onError

client-dist/socket.io.js:4125–4135  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

4123 fn && fn();
4124 });
4125 var onError = function onError(err) {
4126 _this2.cleanup();
4127 _this2._readyState = "closed";
4128 _this2.emitReserved("error", err);
4129 if (fn) {
4130 fn(err);
4131 } else {
4132 // Only do this if there is no fn to handle the error
4133 _this2.maybeReconnectOnOpen();
4134 }
4135 };
4136 // emit `error`
4137 var errorSub = on(socket, "error", onError);
4138 if (false !== this._timeout) {

Callers 1

socket.io.jsFile · 0.70

Calls 3

fnFunction · 0.85
maybeReconnectOnOpenMethod · 0.80
cleanupMethod · 0.45

Tested by

no test coverage detected