CyCoreSystems / audiosocket

Simple bidirectional audio protocol
Apache License 2.0
75 stars 36 forks source link

Fix: use io.ReadFull in NextMessage to handle short reads (#22) #23

Open pjuhasz opened 6 months ago

pjuhasz commented 6 months ago

This commit fixes issue #22.

To recap: it is not valid to assume that the entire packet is going to be available with a single Read() call.

Interestingly, a similar issue was raised by PR #5, on the asterisk side. However, that fix was not merged into mainline asterisk.