Skip to content

Commit

Permalink
Clear closing reason for connection object when a client connects
Browse files Browse the repository at this point in the history
The closing reason would otherwise persist from the previous client disconnecting and would appear when listing connected clients via "/list connections".
  • Loading branch information
daavko authored and jwrober committed Nov 26, 2022
1 parent 400957c commit 2aaf108
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/sernet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ int server_make_connection(QTcpSocket *new_sock, const QString &client_addr)
if (!pconn->used) {
connection_common_init(pconn);
pconn->sock = new_sock;
pconn->closing_reason.clear();
pconn->observer = false;
pconn->playing = nullptr;
pconn->capability[0] = '\0';
Expand Down

0 comments on commit 2aaf108

Please sign in to comment.