fix documentation for EarlyListener.Close (#5284)

* quic: update documentaion for EarlyListener.Close

* fix missing space

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
This commit is contained in:
WeidiDeng
2025-08-13 22:24:07 +08:00
committed by Marten Seemann
parent f0042715d7
commit e0a836f597

View File

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