Skip to content

Commit cf2d54c

Browse files
authored
Merge pull request ckdo#11 from PaulWieland/master
Addresses the reconnect issue and 100% CPU consumption after disconnect
2 parents 722ee76 + e39758a commit cf2d54c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ To run the receiver please use Python 3 and do the following:
5454
* Run the following commands
5555

5656
```zsh
57+
brew install python3
5758
brew install portaudio
58-
virtualenv proto
59+
virtualenv -p /usr/local/bin/python3 proto
5960
source proto/bin/activate
6061
pip install -r requirements.txt
6162
pip install --global-option=build_ext --global-option="-I/usr/local/Cellar/portaudio/19.6.0/include" --global-option="-L/usr/local/Cellar/portaudio/19.6.0/lib" pyaudio
6263

6364

64-
python ap2-receiver.py -m myap2
65+
python ap2-receiver.py -m myap2 --netiface=en0
6566
```
6667

6768
## Windows

ap2-receiver.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,12 @@ def do_TEARDOWN(self):
441441
self.send_header("Server", self.version_string())
442442
self.send_header("CSeq", self.headers["CSeq"])
443443
self.end_headers()
444+
445+
# Erase the hap() instance, otherwise reconnects fail
446+
self.server.hap = None
447+
448+
# terminate the forked event_proc, otherwise a zombie process consumes 100% cpu
449+
self.event_proc.terminate()
444450

445451
def do_SETPEERS(self):
446452
print("SETPEERS %s" % self.path)

0 commit comments

Comments
 (0)