Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
upload_handler: fix slot search
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioribeiro committed Oct 12, 2014
1 parent 119a84e commit 92865f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/upload_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// Use of this source code is governed by a Apache
// license that can be found in the LICENSE file.

var BaseObject = require('base_object');
var BaseObject = require('base_object')
var Settings = require("./settings")
var _ = require("underscore")
var log = require('./log');
var log = require('./log')

class UploadHandler extends BaseObject {
constructor() {
Expand All @@ -16,7 +16,7 @@ class UploadHandler extends BaseObject {
}

getSlot(peerId) {
if (_.contains(this.slots.keys, peerId) || this.hasFreeSlots()) {
if (_.contains(_.keys(this.slots), peerId) || this.hasFreeSlots()) {
this.slots[peerId] = Date.now()
this.updateSlotsCount()
return true
Expand Down

0 comments on commit 92865f1

Please sign in to comment.