aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/examples/tcp_server.rs2
-rw-r--r--core/src/service/tcp_network/long_connection.rs3
2 files changed, 4 insertions, 1 deletions
diff --git a/core/examples/tcp_server.rs b/core/examples/tcp_server.rs
index 6c0e60b..9dce538 100644
--- a/core/examples/tcp_server.rs
+++ b/core/examples/tcp_server.rs
@@ -35,7 +35,7 @@ fn main () {
"gamecli".to_string(),
Arc::clone(&runtime),
|runtime, cmd: GameCli| {
- process_game_cli(runtime, cmd);
+ process_game_cli(runtime, cmd)
}
).build_entry();
diff --git a/core/src/service/tcp_network/long_connection.rs b/core/src/service/tcp_network/long_connection.rs
index a08fc6d..1bac6a2 100644
--- a/core/src/service/tcp_network/long_connection.rs
+++ b/core/src/service/tcp_network/long_connection.rs
@@ -211,6 +211,9 @@ impl PadClientNetwork {
}
Err(err) => {
error!("[TCP Client] [Runtime] Reader encountered an error: {}", err);
+ entry_mutex!(self.runtime, |guard| {
+ guard.send(ControlMessage::End, 0, TCPConnection);
+ });
break;
}
}