Client reported that CronetChunkedOutputStream.write() might block forever when write() is called after we have received onFailed(). If the request has failed, we should not run the loop to wait for the native stack to consume the bytes, since the native stack is done with this request and we will never be called back.
A similar issue was addressed in CronetInputStream.java where read() might block forever. I think we can apply the same approach in Cronet*OutputStream.java.
Comment 1 by xunji...@chromium.org
, Jul 8 2016