try to fix #75
This commit is contained in:
parent
310419f682
commit
ba014f2895
@ -136,10 +136,12 @@ impl UdpSession {
|
|||||||
let (send_pkt_tx, send_pkt_rx) = mpsc::channel(1);
|
let (send_pkt_tx, send_pkt_rx) = mpsc::channel(1);
|
||||||
|
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
match tokio::select!(
|
let res = tokio::select! {
|
||||||
res = Self::listen_send_packet(socket.clone(), send_pkt_rx) => res,
|
res = tokio::spawn(Self::listen_send_packet(socket.clone(), send_pkt_rx)) => res,
|
||||||
res = Self::listen_receive_packet(socket, assoc_id, recv_pkt_tx,max_pkt_size) => res,
|
res = tokio::spawn(Self::listen_receive_packet(socket, assoc_id, recv_pkt_tx, max_pkt_size)) => res,
|
||||||
) {
|
};
|
||||||
|
|
||||||
|
match res.unwrap() {
|
||||||
Ok(()) => (),
|
Ok(()) => (),
|
||||||
Err(err) => log::warn!("[{src_addr}] [udp-session] [{assoc_id}] {err}"),
|
Err(err) => log::warn!("[{src_addr}] [udp-session] [{assoc_id}] {err}"),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user