IsServerRunning reports whether a server answers on the configured address.
(cfg *config.Config)
| 250 | |
| 251 | // IsServerRunning reports whether a server answers on the configured address. |
| 252 | func IsServerRunning(cfg *config.Config) bool { |
| 253 | return portHeld(cfg.Host, cfg.Port) |
| 254 | } |
| 255 | |
| 256 | // Two questions, two probes (TASK-3620). The old single probe was an HTTP GET |
| 257 | // of /health that required a 200, and it was wrong both ways: |