From c03b040240a2d08f367fcc015d1e3d16af613f17 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 14:00:25 +0100 Subject: [PATCH] ax(node): replace prose comment on GracefulClose with usage examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2 — comments as usage examples, not prose descriptions. The previous comment restated what the function name already conveyed. Co-Authored-By: Charon --- pkg/node/transport.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/node/transport.go b/pkg/node/transport.go index d6fd81a..8b90d81 100644 --- a/pkg/node/transport.go +++ b/pkg/node/transport.go @@ -870,7 +870,8 @@ const ( DisconnectShutdown = 1004 // Server shutdown ) -// GracefulClose sends a disconnect message before closing the connection. +// pc.GracefulClose("server shutdown", DisconnectShutdown) +// pc.GracefulClose("idle timeout", DisconnectTimeout) func (pc *PeerConnection) GracefulClose(reason string, code int) error { var err error pc.closeOnce.Do(func() {