diff options
| author | Eskil <eskilq@kth.se> | 2020-11-03 22:02:11 +0100 |
|---|---|---|
| committer | Eskil <eskilq@kth.se> | 2020-11-03 22:02:11 +0100 |
| commit | 831182b69eb1bbfedfad1288b73a822241f18d25 (patch) | |
| tree | 658ad93f339ade36a992643bdff91bf18ec0c347 /mumd/src/network/tcp.rs | |
| parent | 8fb4edd72dfcb2b71e91eedc5861360101374967 (diff) | |
| parent | f169a04da325b6467335812a53b315f1ecc8c7ad (diff) | |
| download | mum-831182b69eb1bbfedfad1288b73a822241f18d25.tar.gz | |
Merge branch 'server-status' into 'main'
Add support for mumctl server list
Closes #29
See merge request gustav/mum!27
Diffstat (limited to 'mumd/src/network/tcp.rs')
| -rw-r--r-- | mumd/src/network/tcp.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/network/tcp.rs b/mumd/src/network/tcp.rs index cd11690..131f066 100644 --- a/mumd/src/network/tcp.rs +++ b/mumd/src/network/tcp.rs @@ -27,7 +27,7 @@ type TcpSender = SplitSink< type TcpReceiver = SplitStream<Framed<TlsStream<TcpStream>, ControlCodec<Serverbound, Clientbound>>>; -pub(crate) type TcpEventCallback = Box<dyn FnOnce(&TcpEventData)>; +pub(crate) type TcpEventCallback = Box<dyn FnOnce(TcpEventData)>; #[derive(Debug, Clone, Hash, Eq, PartialEq)] pub enum TcpEvent { @@ -228,7 +228,7 @@ async fn listen( if let Some(vec) = event_queue.lock().unwrap().get_mut(&TcpEvent::Connected) { let old = std::mem::take(vec); for handler in old { - handler(&TcpEventData::Connected(&msg)); + handler(TcpEventData::Connected(&msg)); } } let mut state = state.lock().unwrap(); @@ -282,7 +282,7 @@ async fn listen( if let Some(vec) = event_queue.lock().unwrap().get_mut(&TcpEvent::Disconnected) { let old = std::mem::take(vec); for handler in old { - handler(&TcpEventData::Disconnected); + handler(TcpEventData::Disconnected); } } }, |
