Skip to content

Commit 4dfb40f

Browse files
authored
Merge pull request #477 from gosuda/codex/fix-server-crash-after-username-in-use
Disconnect on username conflicts
2 parents 97a3ca2 + cb3054b commit 4dfb40f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/host_parts/host_runtime.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3903,6 +3903,9 @@ static void *session_thread(void *arg)
39033903
"newname@<server> (or ssh -l newname <server>).");
39043904
session_send_system_line(ctx, "Type /exit to quit.");
39053905
}
3906+
session_force_disconnect(ctx, "Disconnecting...");
3907+
session_destroy(ctx);
3908+
SESSION_THREAD_RETURN(nullptr);
39063909
} else {
39073910
host_join_attempt_result_t join_result = host_register_join_attempt(
39083911
ctx->owner, ctx->user.name, ctx->client_ip);

0 commit comments

Comments
 (0)