Skip to content

Commit

Permalink
fix: avoid empty installation id
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Nov 28, 2024
1 parent 2c659c7 commit 72d842f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/core/plugin_manager/remote_manager/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ func (s *DifyServer) OnClose(c gnet.Conn, err error) (action gnet.Action) {
// uninstall plugin
if plugin.assetsTransferred {
if _mode != _PLUGIN_RUNTIME_MODE_CI {
if err := plugin.Unregister(); err != nil {
log.Error("unregister plugin failed, error: %v", err)
if plugin.installationId != "" {
if err := plugin.Unregister(); err != nil {
log.Error("unregister plugin failed, error: %v", err)
}
}

// decrease current connection
Expand Down

0 comments on commit 72d842f

Please sign in to comment.