mirror of
https://github.com/FastTunnel/FastTunnel.git
synced 2025-02-08 02:39:29 +08:00
客户端离线,终止listener
This commit is contained in:
parent
f1b6492435
commit
9568077a27
|
@ -120,9 +120,7 @@ namespace FastTunnel.Core.Listener
|
||||||
{
|
{
|
||||||
shutdown = true;
|
shutdown = true;
|
||||||
listenSocket.Close();
|
listenSocket.Close();
|
||||||
Interlocked.Decrement(ref m_numConnectedSockets);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,19 @@ namespace FastTunnel.Core.Models
|
||||||
|
|
||||||
internal void Logout()
|
internal void Logout()
|
||||||
{
|
{
|
||||||
|
// forward监听终止
|
||||||
|
if (forwardInfos != null)
|
||||||
|
{
|
||||||
|
foreach (var item in forwardInfos)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
item.Listener.Stop();
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user