mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Avoid sending innapropriate client_left() msgs to proxy
This commit is contained in:
parent
52f686b621
commit
3ad79d43f9
@ -196,6 +196,8 @@ void tmate_notify_client_join(__unused struct tmate_session *session,
|
||||
if (!tmate_has_proxy())
|
||||
return;
|
||||
|
||||
c->flags |= CLIENT_TMATE_NOTIFIED_JOIN;
|
||||
|
||||
pack(array, 5);
|
||||
pack(int, TMATE_CTL_CLIENT_JOIN);
|
||||
pack(int, c->id);
|
||||
@ -212,6 +214,11 @@ void tmate_notify_client_left(__unused struct tmate_session *session,
|
||||
if (!tmate_has_proxy())
|
||||
return;
|
||||
|
||||
if (!(c->flags & CLIENT_TMATE_NOTIFIED_JOIN))
|
||||
return;
|
||||
|
||||
c->flags &= ~CLIENT_TMATE_NOTIFIED_JOIN;
|
||||
|
||||
pack(array, 2);
|
||||
pack(int, TMATE_CTL_CLIENT_LEFT);
|
||||
pack(int, c->id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user