mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 16:26:57 +08:00
fix: graceful HTTP shutdown, add ErrorBoundary, fix chart responsive height
- main.go: call server.Shutdown() on SIGTERM/SIGINT to drain in-flight requests - Add React ErrorBoundary component (catches render crashes, shows retry UI) - Wrap main content area and settings page with ErrorBoundary - Fix ChartTabs.tsx: replace runtime window.innerWidth check with Tailwind responsive class (h-[500px] md:h-[600px]) - Restarted backend with latest build (health endpoint now returns proper timestamp)
This commit is contained in:
6
main.go
6
main.go
@@ -181,6 +181,12 @@ func main() {
|
||||
<-quit
|
||||
logger.Info("📴 Shutdown signal received, closing system...")
|
||||
|
||||
// Gracefully shutdown HTTP server (drain in-flight requests)
|
||||
if err := server.Shutdown(); err != nil {
|
||||
logger.Warnf("⚠️ HTTP server shutdown error: %v", err)
|
||||
}
|
||||
logger.Info("✅ HTTP server stopped")
|
||||
|
||||
// Stop all traders
|
||||
traderManager.StopAll()
|
||||
logger.Info("✅ System shut down safely")
|
||||
|
||||
Reference in New Issue
Block a user