Flush the connectionRead buffer before throwing connectionClosed.
When the response-data has already been read into the buffer, the connection is closed, and the data already read is sufficient, an exception is thrown and the data cannot be read.
In my case, I am using http-client in haskell/servant. The program can not read response data using getResponse and makeLengthReader.
This PR flushes the connectionRead buffer before throwing connectionClosed.
合并状态:未合并 0 条评论