ax(node): replace prose comment on GracefulClose with usage examples
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:
parent
a97f93b919
commit
c03b040240
1 changed files with 2 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue