diff --git a/cockatrice/src/client.cpp b/cockatrice/src/client.cpp index e4f6d95b..d143dabc 100644 --- a/cockatrice/src/client.cpp +++ b/cockatrice/src/client.cpp @@ -204,6 +204,8 @@ PendingCommand *Client::cmd(const QString &s) void Client::connectToServer(const QString &hostname, unsigned int port, const QString &_playerName, const QString &_password) { + disconnectFromServer(); + playerName = _playerName; password = _password; socket->connectToHost(hostname, port);