Socket.prototype.setTimeout = function(msecs, callback) {
if (msecs > 0) {
timers.enroll(this, msecs);
- if (typeof this.fd === 'number') { timers.active(this); }
+ timers.active(this);
if (callback) {
this.once('timeout', callback);
}
};
+Socket.prototype._onTimeout = function() {
+ this.emit('timeout');
+};
+
+
Socket.prototype.setNoDelay = function() {
/* TODO implement me */
};
var msecs = item._idleTimeout;
if (msecs >= 0) {
var list = lists[msecs];
- if (item._idleNext == item) {
+ if (!list || L.isEmpty(list)) {
insert(item, msecs);
} else {
item._idleStart = new Date();