Skip to content

Commit

Permalink
jessepollak stephen#296
Browse files Browse the repository at this point in the history
  • Loading branch information
iainbrighton committed Jan 6, 2017
1 parent e1b1322 commit b753f4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/airsonos.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ class AirSonos {
}

stop() {
return Promise.all(this.tunnels.map(tunnel.stop));
var promises = []
for (let id in this.tunnels) {
promises.push(this.tunnels[id].stop())
}
return Promise.all(promises);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ class DeviceTunnel extends events.EventEmitter {
}

stop() {
this.airplayServer.stop();
this.icecastServer.stop();
if (this.airplayServer) this.airplayServer.stop();
if (this.icecastServer) this.icecastServer.stop();
}

}
Expand Down

0 comments on commit b753f4c

Please sign in to comment.