ericz 12 жил өмнө
parent
commit
6bd6b2460e
1 өөрчлөгдсөн 4 нэмэгдсэн , 4 устгасан
  1. 4 4
      lib/server.js

+ 4 - 4
lib/server.js

@@ -163,11 +163,11 @@ PeerServer.prototype._checkKey = function(key, ip, cb) {
     if (!this._clients[key]) {
     if (!this._clients[key]) {
       this._clients[key] = {};
       this._clients[key] = {};
     }
     }
-    if (!self._outstanding[key]) {
-      self._outstanding[key] = {};
+    if (!this._outstanding[key]) {
+      this._outstanding[key] = {};
     }
     }
-    if (!self._ips[ip]) {
-      self._ips[ip] = 0;
+    if (!this._ips[ip]) {
+      this._ips[ip] = 0;
     }
     }
     // Check concurrent limit
     // Check concurrent limit
     if (Object.keys(this._clients[key]).length >= this._options.concurrent_limit) {
     if (Object.keys(this._clients[key]).length >= this._options.concurrent_limit) {