Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

lucacasonato/reqwest_connection_pooling_bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The issue has been solved. Thanks @seanmonstar! <3


This demonstrates an issue with connection pooling in reqwest on HTTP/2 that results in following error:

error sending request for url (https://deno-website2.now.sh/): http2 error: protocol error: not a result of an error

This repo contains two examples of the same code. One written in Go using the net/http std lib, and one using reqwest w/ rustls on a single threaded tokio event loop. Both examples start 100 concurrent goroutines/futures, each doing 20 requests to https://deno-website2.now.sh/ in series.

To run the working Go example:

$ cd go
$ GOMAXPROCS=1 go run main.go

To run the reqwest example:

$ cd reqwest
$ cargo run

If instead you create a single client per connection (no connection pooling) you do not experience this issue:

$ cd reqwest
$ cargo run --features no-pool

About

Reproduction for reqwest connection pooling bug

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published