mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Added Socket#onError
This commit is contained in:
@@ -342,6 +342,17 @@ Socket.prototype.close = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Called upon transport error
|
||||
*
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Socket.prototype.onError = function (err) {
|
||||
this.emit('error', err);
|
||||
this.onClose('transport error', err);
|
||||
};
|
||||
|
||||
/**
|
||||
* Called upon transport close.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user