Comparing version 0.6.0 to 0.6.1
0.6.1 / 2013-04-13 | ||
================== | ||
* fix Socket#close() callback support | ||
* add callback to reply() when peer is gone | ||
0.6.0 / 2013-04-13 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -150,2 +150,3 @@ | ||
* | ||
* @param {Function} [fn] | ||
* @api public | ||
@@ -158,10 +159,20 @@ */ | ||
this.closeSockets(); | ||
if (this.server) { | ||
debug('closing server'); | ||
this.server.on('close', this.emit.bind(this, 'close')); | ||
this.server.close(fn); | ||
} | ||
if (this.server) this.closeServer(fn); | ||
}; | ||
/** | ||
* Close the server. | ||
* | ||
* @param {Function} [fn] | ||
* @api public | ||
*/ | ||
Socket.prototype.closeServer = function(fn){ | ||
debug('closing server'); | ||
this.server.on('close', this.emit.bind(this, 'close')); | ||
this.server.close(); | ||
fn && fn(); | ||
}; | ||
/** | ||
* Return the server address. | ||
@@ -168,0 +179,0 @@ * |
{ | ||
"name": "axon", | ||
"description": "High-level messaging & socket patterns implemented in pure js", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
42992
1276