()
| 278 | } |
| 279 | |
| 280 | func (p *Server) client() (proto.DRPCProvisionerDaemonClient, bool) { |
| 281 | select { |
| 282 | case <-p.closeContext.Done(): |
| 283 | return nil, false |
| 284 | case <-p.shuttingDownCh: |
| 285 | // Shutting down should return a nil client and unblock |
| 286 | return nil, false |
| 287 | case client := <-p.clientCh: |
| 288 | return client, true |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | func (p *Server) acquireLoop() { |
| 293 | defer p.opts.Logger.Debug(p.closeContext, "acquire loop exited") |