File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,15 @@ import (
3434 "github.com/coder/serpent"
3535)
3636
37- type closers []func ()
37+ type closerFuncs []func ()
3838
39- func (c closers ) Close () {
39+ func (c closerFuncs ) Close () {
4040 for _ , closeF := range c {
4141 closeF ()
4242 }
4343}
4444
45- func (c * closers ) Add (f func ()) {
45+ func (c * closerFuncs ) Add (f func ()) {
4646 * c = append (* c , f )
4747}
4848
@@ -113,7 +113,8 @@ func (r *RootCmd) proxyServer() *serpent.Command {
113113 serpent .RequireNArgs (0 ),
114114 ),
115115 Handler : func (inv * serpent.Invocation ) error {
116- var closers closers
116+ var closers closerFuncs
117+ defer closers .Close ()
117118 // Main command context for managing cancellation of running
118119 // services.
119120 ctx , topCancel := context .WithCancel (inv .Context ())
You can’t perform that action at this time.
0 commit comments