bytesnake / telebot

Write Telegram bots in Rust with Tokio and Futures
Other
212 stars 33 forks source link

Share a client instead of creating one per request #58

Closed angelsl closed 5 years ago

angelsl commented 6 years ago

This lets Hyper's connection pooling actually work.

Unfortunately this is an API-breaking change. I'm not sure how you want to handle this...

bytesnake commented 6 years ago

Perhaps you can introduce a try_new function, the new function will then just unwrap the result and assume that a failure in hyper is critical for the program.

bytesnake commented 5 years ago

Merged into 40e7d378e0c70e54ea054a1c943d8a0e29b048a3