Response callback for asynchronous invocation is not called.
Once response is received AsyncWrappedOutputStream.setHttpResponse() is called but isAsync is false. As a consequence, handleResponseOnWorkqueue() is not called
isAsync is set to true during the close process through a call to AsyncWrappedOutputStream.handleResponseAsync() but its too late.
It might be a race condition.
As a fix, i added isAsync as a constructor argument to AsyncWrappedOutputStream().