Use external event sender
This commit is contained in:
parent
b6c58b8a2b
commit
dfb5ade023
1 changed files with 3 additions and 3 deletions
|
|
@ -383,8 +383,8 @@ pub async fn new(
|
||||||
url: String,
|
url: String,
|
||||||
room: String,
|
room: String,
|
||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
) -> (Arc<Mutex<CoveConn>>, CoveConnMt, UnboundedReceiver<Event>) {
|
ev_tx: UnboundedSender<Event>,
|
||||||
let (ev_tx, ev_rx) = mpsc::unbounded_channel();
|
) -> (Arc<Mutex<CoveConn>>, CoveConnMt) {
|
||||||
let conn = Arc::new(Mutex::new(CoveConn {
|
let conn = Arc::new(Mutex::new(CoveConn {
|
||||||
state: State::Connecting,
|
state: State::Connecting,
|
||||||
ev_tx: ev_tx.clone(),
|
ev_tx: ev_tx.clone(),
|
||||||
|
|
@ -396,5 +396,5 @@ pub async fn new(
|
||||||
conn,
|
conn,
|
||||||
ev_tx,
|
ev_tx,
|
||||||
};
|
};
|
||||||
(mt.conn.clone(), mt, ev_rx)
|
(mt.conn.clone(), mt)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue