Skip to content

Commit 748e6e6

Browse files
committed
fix: filter eof errors
Signed-off-by: Samuel K <skevetter@pm.me>
1 parent d165cf7 commit 748e6e6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/devcontainer/sshtunnel/sshtunnel.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ func waitForTunnelCompletion(tc *tunnelContext) (*config2.Result, error) {
151151

152152
tc.opts.Log.Debug("SSH tunnel execution completed")
153153

154+
// When the tunnel server received a valid result the agent work is done.
155+
// The SSH session closing with EOF at this point is expected, not an error.
156+
if result != nil {
157+
filtered := errs[:0]
158+
for _, e := range errs {
159+
if !errors.Is(e, io.EOF) {
160+
filtered = append(filtered, e)
161+
}
162+
}
163+
errs = filtered
164+
}
165+
154166
// Return first error or combine multiple errors
155167
if len(errs) == 0 {
156168
return result, nil

0 commit comments

Comments
 (0)