()
| 36 | ) |
| 37 | |
| 38 | func (p *Server) debugService() *chatdebug.Service { |
| 39 | if p == nil { |
| 40 | return nil |
| 41 | } |
| 42 | if p.debugSvcFactory == nil { |
| 43 | return p.debugSvc |
| 44 | } |
| 45 | p.debugSvcInit.Do(func() { |
| 46 | p.debugSvc = p.debugSvcFactory() |
| 47 | p.debugSvcReady.Store(p.debugSvc != nil) |
| 48 | }) |
| 49 | return p.debugSvc |
| 50 | } |
| 51 | |
| 52 | func (p *Server) existingDebugService() *chatdebug.Service { |
| 53 | if p == nil { |
no test coverage detected