Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3376482
D10903.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
810 B
Referenced Files
None
Subscribers
None
D10903.diff
View Options
diff --git a/services/identity/src/websockets/send.rs b/services/identity/src/websockets/send.rs
--- a/services/identity/src/websockets/send.rs
+++ b/services/identity/src/websockets/send.rs
@@ -15,7 +15,7 @@
pub async fn send_error_response(
error: errors::WebsocketError,
- outgoing: Arc<Mutex<SplitSink<WebSocketStream<Upgraded>, Message>>>,
+ outgoing: WebsocketSink,
) {
let response_msg = serde_json::json!({
"action": "errorMessage",
@@ -35,10 +35,7 @@
}
}
-pub async fn send_message(
- message: Message,
- outgoing: Arc<Mutex<SplitSink<WebSocketStream<Upgraded>, Message>>>,
-) {
+pub async fn send_message(message: Message, outgoing: WebsocketSink) {
if let Err(e) = outgoing.lock().await.send(message).await {
error!("Failed to send message to device: {}", e);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 12:34 AM (21 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2592184
Default Alt Text
D10903.diff (810 B)
Attached To
Mode
D10903: [identity] [10/n] Replace usages of Arc<Mutex<SplitSink<WebSocketStream<Upgraded>, Message>>> with custom type WebsocketSink
Attached
Detach File
Event Timeline
Log In to Comment