Permalink
Browse files

unnecessary if statement

  • Loading branch information...
1 parent c36e1be commit 5615cbc5a8b4f462b1b6428da6db0959fb3a7add @ericz ericz committed Apr 4, 2013
Showing with 6 additions and 8 deletions.
  1. +6 −8 lib/peer.js
View
@@ -221,15 +221,13 @@ Peer.prototype._abort = function(type, message) {
Peer.prototype._cleanup = function() {
var self = this;
- if (!!this.managers) {
- var peers = Object.keys(this.managers);
- for (var i = 0, ii = peers.length; i < ii; i++) {
- this.managers[peers[i]].close();
- }
- util.setZeroTimeout(function(){
- self.disconnect();
- });
+ var peers = Object.keys(this.managers);
+ for (var i = 0, ii = peers.length; i < ii; i++) {
+ this.managers[peers[i]].close();
}
+ util.setZeroTimeout(function(){
+ self.disconnect();
+ });
this.emit('close');
};

0 comments on commit 5615cbc

Please sign in to comment.