SIGN IN SIGN UP

Fix "docker-java-stream" thread stuck at UnixDomainSocket.recv() (#1476)

* Fix "docker-java-stream" thread stuck at UnixDomainSocket.recv() (OkHttp transport) (#1475)

Prevent unnecessary recurring calls of `recv()` on UNIX socket, which sometimes results in blocking read and causes hanging of "docker-java-stream" thread.

* Fix potential stuck at UnixDomainSocket.read() (HttpClient transport) (#1475)

Prevent unnecessary recurring calls of `read()` on UNIX socket, which may result in blocking read and cause hanging of "docker-java-stream" thread.

* Use data's length value instead of calculating length once again

* Let UnixSocketInputStream.read(..) return -1 when the socket is disconnected or EOF is reached

* Move isConnected() check to the beginning of read(..) method

* Make UnixSocketInputStream.read() return -1 if EOF has been reached

Co-authored-by: Alexander Koshevoy <Alexander.Koshevoy@jetbrains.com>
Co-authored-by: Sergei Egorov <bsideup@gmail.com>
A
Alexander Koshevoy committed
d85ea79eaf7b2a3117f2cf04fac61b354c53e0d2
Parent: 0d08a33
Committed by GitHub <noreply@github.com> on 11/16/2020, 3:59:04 PM