Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unset client.conn.playing on disconnect #2219

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/clinet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
static void close_socket_nomessage(struct connection *pc)
{
connection_common_close(pc);
remove_net_input();
pc->playing = nullptr;

popdown_races_dialog();

set_client_state(C_S_DISCONNECTED);
Expand Down
7 changes: 0 additions & 7 deletions client/gui_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,6 @@ void sound_bell()
*/
void add_net_input(QIODevice *sock) { king()->add_server_source(sock); }

/**
Stop waiting for any server network data. See add_net_input().

This function is called if the client disconnects from the server.
*/
void remove_net_input() {}

/**
Set one of the unit icons (specified by idx) in the information area
based on punit.
Expand Down
1 change: 0 additions & 1 deletion client/qtg_cxxside.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class QTcpSocket;
void options_extra_init();
void set_rulesets(int num_rulesets, QStringList rulesets);
void add_net_input(QIODevice *sock);
void remove_net_input();
void real_conn_list_dialog_update(void *unused);
void sound_bell();

Expand Down
Loading