From cf4fcaa07f120d4a7b65c716fdcb1ae72023754b Mon Sep 17 00:00:00 2001 From: igophper <34326532+igophper@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:48:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E7=BC=96=E8=BE=91ssh?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E5=90=8C=E6=AD=A5=E5=88=B0=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E6=9C=8D=E5=8A=A1=E5=99=A8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#4043)=20(#4093)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/ssh.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app/service/ssh.go b/backend/app/service/ssh.go index f0f0cdc67..15d353f14 100644 --- a/backend/app/service/ssh.go +++ b/backend/app/service/ssh.go @@ -177,7 +177,11 @@ func (u *SSHService) Update(req dto.SSHUpdate) error { }, } if err := NewIFirewallService().UpdatePortRule(ruleItem); err != nil { - global.LOG.Errorf("reset firewall rules %s -> %s failed, err: %v", req.OldValue, req.OldValue, err) + global.LOG.Errorf("reset firewall rules %s -> %s failed, err: %v", req.OldValue, req.NewValue, err) + } + + if err = NewIHostService().Update(1, map[string]interface{}{"port": req.NewValue}); err != nil { + global.LOG.Errorf("reset host port %s -> %s failed, err: %v", req.OldValue, req.NewValue, err) } }