server plugin: add client address in Login operation, fix #2742 (#2751)

This commit is contained in:
fatedier
2022-01-11 16:32:20 +08:00
committed by GitHub
parent e9775bd70f
commit 22412851b4
3 changed files with 11 additions and 1 deletions

View File

@@ -334,7 +334,8 @@ func (svr *Service) handleConnection(ctx context.Context, conn net.Conn) {
case *msg.Login:
// server plugin hook
content := &plugin.LoginContent{
Login: *m,
Login: *m,
ClientAddress: conn.RemoteAddr().String(),
}
retContent, err := svr.pluginManager.Login(content)
if err == nil {