Skip to content

Commit 7d680b7

Browse files
Rustin170506ngaut
authored andcommitted
plugin: fix static check issues (pingcap#13881)
1 parent ea1662a commit 7d680b7

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

plugin/conn_ip_example/conn_ip_example.go

-1
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,4 @@ func OnGeneralEvent(ctx context.Context, sctx *variable.SessionVars, event plugi
4545
fmt.Println("conn_ip_example notifiy called")
4646
fmt.Println("variable test: ", variable.GetSysVar("conn_ip_example_test_variable").Value)
4747
fmt.Printf("new connection by %s\n", ctx.Value("ip"))
48-
return
4948
}

plugin/plugin.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ func (p *plugins) clone() *plugins {
5959
for key, value := range p.versions {
6060
np.versions[key] = value
6161
}
62-
for key, value := range p.dyingPlugins {
63-
np.dyingPlugins[key] = value
64-
}
62+
copy(np.dyingPlugins, p.dyingPlugins)
6563
return np
6664
}
6765

0 commit comments

Comments
 (0)