Avoid Arc::try_unwrap which causes a panic when multiple clients are connected
This commit is contained in:
parent
8d520a156d
commit
57722f9489
|
@ -46,7 +46,7 @@ pub enum Output {
|
|||
#[derive(Serialize, Deserialize, Debug, Message)]
|
||||
#[rtype(result = "()")]
|
||||
pub struct OutputMessage {
|
||||
pub msg: Output,
|
||||
pub msg: Arc<Output>,
|
||||
pub meta: Meta,
|
||||
}
|
||||
|
||||
|
|
|
@ -73,8 +73,7 @@ impl Handler<eventbus::Event> for WSClient {
|
|||
ts: Utc::now(),
|
||||
};
|
||||
let out = OutputMessage {
|
||||
// TODO: error
|
||||
msg: Arc::try_unwrap(event.e).unwrap(),
|
||||
msg: event.e,
|
||||
meta,
|
||||
};
|
||||
// TODO: error
|
||||
|
|
Loading…
Reference in New Issue