Open Jaredjin opened 1 year ago
这里返回 None
的前提应该是 input_tx
析构,或者调用了 close()
,目前的实现应该都不可能,因为 KcpSession
不会析构。
KcpSession
退出的条件是这里
@zonyitoo
意思是长时间运行会有大量KcpSession泄漏吗
@zonyitoo
意思是长时间运行会有大量KcpSession泄漏吗
如果 expire设置为了 0,长时间运行,sessions结构确实会越来越大,这是 UDP 特性导致的
server模式下, 循环不结束,是否应该添加 input_rx.recv() 失败时结束循环?
let io_task_handle = { let session = session.clone(); tokio::spawn(async move { let mut input_buffer = [0u8; 65536];