fn forward_payment_notifications(
    ws_request: tungstenite::http::Request<()>,
    sender: tokio::sync::mpsc::Sender<tungstenite::Message>,
) -> Result<(), tungstenite::Error> {
    let mut payments_ws = client::connect(ws_request)?.0;
    while let Ok(message) = payments_ws.read_message() {
        sender.try_send(message).unwrap();
    }
    payments_ws.close(None)
}
/// Forwards the payment notifications from the websocket into the channel
/// When runtime (rt) is dropped, error will happen ending the loop and then the websocket
Forwards the payment notifications from the websocket into the channel
When runtime (rt) is dropped, error will happen ending the loop and then the websocket
Forwards the payment notifications from the websocket into the channel When runtime ( rt ) is dropped error will happen ending the loop and then the websocket
fn forward_payment_notifications(
    ws_request: tungstenite::http::Request<()>,
    sender: tokio::sync::mpsc::Sender<tungstenite::Message>,
) -> Result<(), tungstenite::Error> {
    let mut payments_ws = client::connect(ws_request)?.0;
    while let Ok(message) = payments_ws.read_message() {
        sender.try_send(message).unwrap();
    }
    payments_ws.close(None)
}
fn forward_payment_notifications ( ws_request : tungstenite :: http :: Request < ( ) > , sender : tokio :: sync :: mpsc :: Sender < tungstenite :: Message > , ) -> Result < ( ) , tungstenite :: Error > { let mut payments_ws = client :: connect ( ws_request ) ? . 0 ; while let Ok ( message ) = payments_ws . read_message ( ) { sender . try_send ( message ) . unwrap ( ) ; } payments_ws . close ( None ) }
Forwards the payment notifications from the websocket into the channel
When runtime (rt) is dropped, error will happen ending the loop and then the websocket
Forwards the payment notifications from the websocket into the channel When runtime ( rt ) is dropped error will happen ending the loop and then the websocket
ws_request
tungstenite::http::Request<()>
sender
tokio::sync::mpsc::Sender<tungstenite::Message>
ws_request
tungstenite::http::Request<()>
sender
tokio::sync::mpsc::Sender<tungstenite::Message>