ax(node): replace prose comment on GracefulClose with usage examples
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 2 — comments as usage examples, not prose descriptions.
The previous comment restated what the function name already conveyed.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 14:00:25 +01:00
parent a97f93b919
commit c03b040240
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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() {