Check if response is chunked before closing connection in tryWrite