Chris Lu and GitHub
16ba8af0b7
util/http: lazily init the global HTTP client to fix admin metrics nil panic ( #10044 )
...
util/http: lazily init the global HTTP client
GetGlobalHttpClient returned a nil client until InitGlobalHttpClient ran,
which only happens in weed.go's main. Anything that starts a command
in-process bypasses that: the admin server's metrics goroutine seeds a
dashboard sample on startup, reaching fetchPublicUrlMap -> GetGlobalHttpClient().Do,
and nil-derefs the receiver in GetHttpScheme.
Init the client on first Get via sync.Once so it is never nil regardless of
the startup path. InitGlobalHttpClient keeps its eager-init role through the
same Once.
2026-06-22 10:20:02 -07:00
..
2026-05-10 13:34:25 -07:00
2024-05-05 12:20:08 -07:00
2026-05-08 13:12:11 -07:00
2026-04-10 17:31:14 -07:00
2023-11-26 11:47:20 -08:00
2026-04-16 16:11:01 -07:00
2026-06-22 10:20:02 -07:00
2026-04-21 20:20:11 -07:00
2026-06-10 12:47:35 -07:00
2026-01-07 13:06:08 -08:00
2026-04-26 16:31:53 -07:00
2026-03-06 15:22:39 -08:00
2026-05-21 02:30:49 -07:00
2026-06-12 10:10:27 -07:00
2026-06-22 00:24:50 -07:00
2026-02-27 12:22:21 -08:00
2026-06-19 09:19:35 -07:00
2026-06-19 09:19:35 -07:00
2026-02-10 18:38:38 -08:00
2026-02-10 18:38:38 -08:00
2026-06-08 22:07:24 -07:00
2026-06-08 22:07:24 -07:00
2022-09-14 11:24:09 -07:00
2022-07-29 00:17:28 -07:00
2022-07-29 00:17:28 -07:00
2025-07-02 18:03:49 -07:00
2025-10-31 12:49:04 -07:00
2026-02-20 18:42:00 -08:00
2026-02-20 18:42:00 -08:00
2026-02-20 18:42:00 -08:00
2026-02-20 18:42:00 -08:00
2026-04-16 09:38:42 -07:00
2026-04-16 09:38:42 -07:00
2026-04-16 09:38:42 -07:00
2026-02-20 18:42:00 -08:00
2026-02-20 18:42:00 -08:00
2026-05-03 21:46:21 -07:00
2026-06-13 21:26:07 -07:00
2026-04-23 19:17:35 -07:00
2026-04-23 19:17:35 -07:00
2026-01-07 13:06:08 -08:00
2022-09-25 13:34:55 -07:00
2026-03-19 16:08:24 -07:00
2026-04-03 16:04:27 -07:00
2026-02-19 13:30:59 -08:00
2025-12-04 18:31:46 -08:00
2026-02-12 18:11:03 -08:00
2026-06-05 12:44:21 -07:00
2026-06-05 12:44:21 -07:00
2025-01-22 00:48:55 -08:00
2025-12-30 14:28:50 -08:00
2025-12-30 14:28:50 -08:00
2026-01-07 13:06:08 -08:00
2022-09-14 10:12:45 -07:00
2024-12-19 19:25:06 -08:00
2026-03-08 16:05:45 -07:00
2026-03-08 16:05:45 -07:00
2026-04-16 10:18:05 -07:00
2026-04-16 10:18:05 -07:00
2026-06-10 13:33:45 -07:00
2026-03-01 10:22:00 -08:00
2024-10-31 08:40:05 -07:00