mirror of
https://github.com/avwo/whistle.git
synced 2026-10-29 15:09:28 +08:00
refine code
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user