mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-08 07:37:41 +00:00
Fix bug introduced by 86e7af0398
This commit is contained in:
parent
167059c9d8
commit
94d70d11f4
1 changed files with 4 additions and 1 deletions
|
@ -580,7 +580,10 @@ impl<'a> TunToProxy<'a> {
|
|||
fn mio_socket_event(&mut self, event: &Event) -> Result<(), Error> {
|
||||
let e = "connection not found";
|
||||
let conn_ref = self.token_to_connection.get(&event.token());
|
||||
let connection = conn_ref.ok_or(e)?.clone();
|
||||
if conn_ref.is_none() {
|
||||
return Ok(());
|
||||
}
|
||||
let connection = conn_ref.unwrap().clone();
|
||||
|
||||
(|| -> Result<(), Error> {
|
||||
if event.is_readable() || event.is_read_closed() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue