Skip to content

Commit

Permalink
Add failed to connect reason to client.
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Aug 16, 2024
1 parent b476501 commit 80351a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/multiplayer_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void GameClient::update(float /*delta*/)
{
case sp::io::network::StreamSocket::State::Closed:
status = Disconnected;
disconnect_reason = DisconnectReason::FailedToConnect;
LOG(INFO) << "GameClient: Failed to connect";
break;
case sp::io::network::StreamSocket::State::Connecting:
Expand Down
1 change: 1 addition & 0 deletions src/multiplayer_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class GameClient : public Updatable
enum class DisconnectReason : uint8_t
{
None = 0,
FailedToConnect,
VersionMismatch,
BadCredentials,
TimedOut,
Expand Down

0 comments on commit 80351a2

Please sign in to comment.