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