Skip to content

Commit 72f1835

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Mark WSM return as infallible (#28613)
It can't fail! It's spawned so this is ideal. GitOrigin-RevId: cdc777738facee6da6725a51ff1d60be2a2eeb22
1 parent 99b12d9 commit 72f1835

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/convex/src/sync/web_socket_manager.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use std::time::Duration;
1+
use std::{
2+
convert::Infallible,
3+
time::Duration,
4+
};
25

36
use anyhow::Context;
47
use async_trait::async_trait;
@@ -77,7 +80,7 @@ struct WebSocketWorker {
7780

7881
pub struct WebSocketManager {
7982
internal_sender: mpsc::UnboundedSender<WebSocketRequest>,
80-
worker_handle: JoinHandle<anyhow::Result<()>>,
83+
worker_handle: JoinHandle<Infallible>,
8184
}
8285
impl Drop for WebSocketManager {
8386
fn drop(&mut self) {
@@ -128,7 +131,7 @@ impl WebSocketWorker {
128131
ws_url: Url,
129132
on_response: mpsc::Sender<ProtocolResponse>,
130133
internal_receiver: mpsc::UnboundedReceiver<WebSocketRequest>,
131-
) -> anyhow::Result<()> {
134+
) -> Infallible {
132135
let ping_ticker = tokio::time::interval(Self::HEARTBEAT_INTERVAL);
133136
let backoff = Backoff::new(INITIAL_BACKOFF, MAX_BACKOFF);
134137

0 commit comments

Comments
 (0)