From 272ea57b541c33846add2b9b493c0ca011985c93 Mon Sep 17 00:00:00 2001 From: Jose Garcia Date: Thu, 9 Sep 2021 21:00:09 +0000 Subject: [PATCH] revert comment update --- port_forwarder.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/port_forwarder.go b/port_forwarder.go index be191c211..8011d19fc 100644 --- a/port_forwarder.go +++ b/port_forwarder.go @@ -33,7 +33,9 @@ func NewPortForwarder(session *Session, name string, remotePort int) *PortForwar // connecting to the socket prematurely.) // // ForwardToListener accepts and handles connections on the local port -// until the context is cancelled. The caller is responsible for closing the listening port. +// until it encounters the first error, which may include context +// cancellation. Its error result is always non-nil. The caller is +// responsible for closing the listening port. func (fwd *PortForwarder) ForwardToListener(ctx context.Context, listen net.Listener) (err error) { id, err := fwd.shareRemotePort(ctx) if err != nil {