mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
refactor
This commit is contained in:
parent
9b1d20943f
commit
4ee1abdaff
@ -158,6 +158,8 @@ func (m *Client) Closed() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Client) monitor() {
|
func (m *Client) monitor() {
|
||||||
|
defer m.manager.onClientFinish()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-m.ctx.Done():
|
case <-m.ctx.Done():
|
||||||
@ -172,8 +174,6 @@ func (m *Client) monitor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Client) cleanup() {
|
func (m *Client) cleanup() {
|
||||||
defer m.manager.onClientFinish()
|
|
||||||
|
|
||||||
m.access.Lock()
|
m.access.Lock()
|
||||||
defer m.access.Unlock()
|
defer m.access.Unlock()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user