Skip to content

Commit 1a48bea

Browse files
committed
Fix defer inside loops
1 parent 223540e commit 1a48bea

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

agent/agent.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ func (s *server) run(ctx context.Context) {
260260
s.options.Logger.Warn(context.Background(), "failed to dial", slog.Error(err))
261261
continue
262262
}
263-
defer func() {
264-
_ = peerListener.Close()
265-
}()
266263
s.options.Logger.Debug(context.Background(), "connected")
267264
break
268265
}

coderd/provisionerdaemons.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ func (api *api) provisionerDaemonsServe(rw http.ResponseWriter, r *http.Request)
8484
_ = conn.Close(websocket.StatusInternalError, fmt.Sprintf("multiplex server: %s", err))
8585
return
8686
}
87-
go func() {
88-
<-r.Context().Done()
89-
_, _ = fmt.Printf("\n\n\n\nDONE\n\n\n\n")
90-
}()
9187
mux := drpcmux.New()
9288
err = proto.DRPCRegisterProvisionerDaemon(mux, &provisionerdServer{
9389
ID: daemon.ID,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy