Skip to content

Commit

Permalink
fix: update start_tcp_worker to use TCPListen variant of `Protoco…
Browse files Browse the repository at this point in the history
…l` enum

Signed-off-by: Florentin Dubois <[email protected]>
  • Loading branch information
FlorentinDUBOIS committed Jul 11, 2023
1 parent 16c7399 commit 97034bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,29 +1534,29 @@ pub fn start_tcp_worker(
let entry = sessions.vacant_entry();
info!("taking token {:?} for channel", entry.key());
entry.insert(Rc::new(RefCell::new(ListenSession {
protocol: Protocol::HTTPListen,
protocol: Protocol::TCPListen,
})));
}
{
let entry = sessions.vacant_entry();
info!("taking token {:?} for timer", entry.key());
entry.insert(Rc::new(RefCell::new(ListenSession {
protocol: Protocol::HTTPListen,
protocol: Protocol::TCPListen,
})));
}
{
let entry = sessions.vacant_entry();
info!("taking token {:?} for metrics", entry.key());
entry.insert(Rc::new(RefCell::new(ListenSession {
protocol: Protocol::HTTPListen,
protocol: Protocol::TCPListen,
})));
}

let token = {
let entry = sessions.vacant_entry();
let key = entry.key();
let _e = entry.insert(Rc::new(RefCell::new(ListenSession {
protocol: Protocol::HTTPListen,
protocol: Protocol::TCPListen,
})));
Token(key)
};
Expand Down

0 comments on commit 97034bd

Please sign in to comment.