forked from Mirrorlandia_minetest/minetest
Display an access denied message when client detects a server timeout
This commit is contained in:
parent
2c359da836
commit
9c76f379ac
@ -743,14 +743,19 @@ bool Client::loadMedia(const std::string &data, const std::string &filename)
|
|||||||
// Virtual methods from con::PeerHandler
|
// Virtual methods from con::PeerHandler
|
||||||
void Client::peerAdded(con::Peer *peer)
|
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_reason = gettext("Connection timed out.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user