interledger / interledger-rs

An easy-to-use, high-performance Interledger implementation written in Rust
http://interledger.rs
Other
201 stars 70 forks source link

Close BTP connection if a BTP token is provided #611

Closed gakonst closed 4 years ago

gakonst commented 4 years ago

If a BTP token is provided, we should just remove the existing connection from the WebSockets HashMap, since a new one will be created by the connect_to_external_services call.

I've added a timeout on the send_request call to not hang forever if the server closes the connection and leaves us with a broken websocket.

Closes https://github.com/interledger-rs/interledger-rs/issues/356