From e0a836f59779f8fc87a7d509c34b19358ca1bf09 Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Wed, 13 Aug 2025 22:24:07 +0800 Subject: [PATCH] fix documentation for EarlyListener.Close (#5284) * quic: update documentaion for EarlyListener.Close * fix missing space --------- Co-authored-by: Marten Seemann --- server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index f6bef2d8..13234df2 100644 --- a/server.go +++ b/server.go @@ -132,7 +132,7 @@ func (l *Listener) Accept(ctx context.Context) (*Conn, error) { // Close closes the listener. // Accept will return [ErrServerClosed] as soon as all connections in the accept queue have been accepted. // QUIC handshakes that are still in flight will be rejected with a CONNECTION_REFUSED error. -// Already established (accepted)connections will be unaffected. +// Already established (accepted) connections will be unaffected. func (l *Listener) Close() error { return l.baseServer.Close() } @@ -161,7 +161,10 @@ func (l *EarlyListener) Accept(ctx context.Context) (*Conn, error) { return conn, nil } -// Close the server. All active connections will be closed. +// Close closes the listener. +// Accept will return [ErrServerClosed] as soon as all connections in the accept queue have been accepted. +// Early connections that are still in flight will be rejected with a CONNECTION_REFUSED error. +// Already established (accepted) connections will be unaffected. func (l *EarlyListener) Close() error { return l.baseServer.Close() }