Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#39 The HTTPS Stream will no longer rely on InputStream.available() a…
…s a condition to keep reading data.
- Loading branch information
3e481a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this fix does bypass the current problem, without a "will it block" check, I think this has the potential to cause all the readers to block at this point (under high load) and bring the entire MMS to a stop since all threads are preallocated and shared within a scheduler loop. It might be best to instead return -1 (instead of 0 indicating EOF) and handle the -1 as a special case of "nothing to read right now" in the process() method of WavTrackImpl.java
3e481a6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi slhayden,
I do agree with potential for locking here. When time allows, I will migrate this class to NIO.
Would you like to contribute with a fix for this issue?
Regards