refine code

This commit is contained in:
avwo
2015-11-03 12:07:29 +08:00
parent 53210590fb
commit 8ccaee48fd
-5
View File
@@ -92,12 +92,7 @@ proto.destroy = function destroy() {
this._serverCount = 0;
for (var i in cache) {
var promise = cache[i];
if (promise._pending) {
return;
}
promise._pending = true;
promise.done(function(port) {
promise._pending = false;
setTimeout(function() {
try {
promise.server.close();