mirror of
https://github.com/minetest/minetest.git
synced 2024-12-24 07:02:23 +01:00
Don't ignore server disconnects in client code
If the server stops talking to us without saying bye we should actually end the in-game session with an error message.
This commit is contained in:
parent
371f21fb35
commit
2f32044273
@ -786,16 +786,18 @@ void Client::peerAdded(con::Peer *peer)
|
|||||||
infostream << "Client::peerAdded(): peer->id="
|
infostream << "Client::peerAdded(): peer->id="
|
||||||
<< peer->id << std::endl;
|
<< peer->id << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::deletingPeer(con::Peer *peer, bool timeout)
|
void Client::deletingPeer(con::Peer *peer, bool timeout)
|
||||||
{
|
{
|
||||||
infostream << "Client::deletingPeer(): "
|
infostream << "Client::deletingPeer(): "
|
||||||
"Server Peer is getting deleted "
|
"Server Peer is getting deleted "
|
||||||
<< "(timeout=" << timeout << ")" << std::endl;
|
<< "(timeout=" << timeout << ")" << std::endl;
|
||||||
|
|
||||||
if (timeout) {
|
m_access_denied = true;
|
||||||
m_access_denied = true;
|
if (timeout)
|
||||||
m_access_denied_reason = gettext("Connection timed out.");
|
m_access_denied_reason = gettext("Connection timed out.");
|
||||||
}
|
else
|
||||||
|
m_access_denied_reason = gettext("Connection aborted (protocol error?).");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user