Refactored connection shutdown logic.

This commit is contained in:
Jay
2026-04-19 09:29:12 -04:00
parent 72f0793047
commit 6998ccf701
7 changed files with 175 additions and 161 deletions
+2 -2
View File
@@ -281,7 +281,7 @@ func TestCloseLogging(t *testing.T) {
records := mockHandler.GetRecords()
expected := []expectedLog{
{slog.LevelInfo, "closing", map[string]any{"state": "connected"}},
{slog.LevelInfo, "shutting down", map[string]any{}},
{slog.LevelInfo, "closed", map[string]any{}},
}
@@ -311,7 +311,7 @@ func TestCloseLogging(t *testing.T) {
records := mockHandler.GetRecords()
expected := []expectedLog{
{slog.LevelInfo, "closing", map[string]any{"state": "connected"}},
{slog.LevelInfo, "shutting down", map[string]any{}},
{slog.LevelError, "socket close failed", map[string]any{"error": closeErr}},
}