You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
basic: endless loop on connection close in tcp_stream #36
InputStream.read() returns -1 at end of stream, and the result is never checked.
When the camera closes the connection while a packet is being read, read keeps decreasing by 1. The inner loop never ends and never checks activeStream, so the network thread hangs at 100% CPU and the app never reconnects.
At EOF the header read gives len = -1, so new byte[-1] throws NegativeArraySizeException.
Fix: check every read for -1 and throw IOException, so the outer loop reconnects.
Activity
Merge pull request #41 from OpenIPC/fix/basic
compot-dev commentedon Oct 12, 2026
Fixed in #41 (merged into
basicas 6cf68b5). Not closed automatically becausebasicis not the default branch.