Skip to content

Commit 4ce74e4

Browse files
committed
Fix invalid key legnth issue (stephen#316), stop issue (stephen#296)
1 parent 9e7a3ca commit 4ce74e4

File tree

5 files changed

+4205
-5
lines changed

5 files changed

+4205
-5
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Install latest via source
1212
```
1313
$ git clone https://github.com/stephen/airsonos.git
1414
$ cd airsonos
15-
$ npm install -g
15+
$ npm install
1616
```
1717

1818
### Platform Specific Instructions

lib/airsonos.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ class AirSonos {
5050
}
5151

5252
stop() {
53-
return Promise.all(this.tunnels.map(tunnel.stop));
53+
var promises = []
54+
for (let id in this.tunnels) {
55+
promises.push(this.tunnels[id].stop())
56+
}
57+
return Promise.all(promises);
5458
}
5559
}
5660

lib/tunnel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ class DeviceTunnel extends events.EventEmitter {
9696
}
9797

9898
stop() {
99-
this.airplayServer.stop();
100-
this.icecastServer.stop();
99+
if (this.airplayServer) this.airplayServer.stop();
100+
if (this.icecastServer) this.icecastServer.stop();
101101
}
102102

103103
}

0 commit comments

Comments
 (0)