* minor: make it clear on the console when a client is being logged out because that client has not responded to pings
parent
0a18d544c5
commit
fb4eb05ae1
|
@ -637,9 +637,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
protected int m_terrainCheckerCount = 0;
|
protected int m_terrainCheckerCount = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event handler for check client timer
|
/// Event handler for check client timer
|
||||||
/// checks to ensure that the client is still connected
|
/// Checks to ensure that the client is still connected. If the client has failed to respond to many pings
|
||||||
|
/// in succession then close down the connection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
|
@ -648,11 +650,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported)
|
if (m_PacketHandler.PacketsReceived == m_PacketHandler.PacketsReceivedReported)
|
||||||
{
|
{
|
||||||
m_probesWithNoIngressPackets++;
|
m_probesWithNoIngressPackets++;
|
||||||
if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) || (m_probesWithNoIngressPackets > 90 && m_clientBlocked))
|
if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked)
|
||||||
|
|| (m_probesWithNoIngressPackets > 90 && m_clientBlocked))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (OnConnectionClosed != null)
|
if (OnConnectionClosed != null)
|
||||||
{
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[CLIENT]: Client for agent {0} {1} has stopped responding to pings. Closing connection",
|
||||||
|
Name, AgentId);
|
||||||
|
|
||||||
OnConnectionClosed(this);
|
OnConnectionClosed(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -682,6 +688,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// Establish our two timers. We could probably get this down to one
|
// Establish our two timers. We could probably get this down to one
|
||||||
|
|
||||||
|
// Ping the client regularly to check that it's still there
|
||||||
m_clientPingTimer = new Timer(5000);
|
m_clientPingTimer = new Timer(5000);
|
||||||
m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
|
m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity);
|
||||||
m_clientPingTimer.Enabled = true;
|
m_clientPingTimer.Enabled = true;
|
||||||
|
@ -3402,12 +3409,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="client">
|
/// <param name="client"></param>
|
||||||
/// A <see cref="IClientAPI"/>
|
/// <returns></returns>
|
||||||
/// </param>
|
|
||||||
/// <returns>
|
|
||||||
/// A <see cref="System.Boolean"/>
|
|
||||||
/// </returns>
|
|
||||||
protected virtual bool Logout(IClientAPI client)
|
protected virtual bool Logout(IClientAPI client)
|
||||||
{
|
{
|
||||||
m_log.Info("[CLIENT]: Got a logout request");
|
m_log.Info("[CLIENT]: Got a logout request");
|
||||||
|
|
Loading…
Reference in New Issue