diff --git a/internal/liveshare/client.go b/internal/liveshare/client.go index b51e25ea6..76f8146de 100644 --- a/internal/liveshare/client.go +++ b/internal/liveshare/client.go @@ -130,7 +130,7 @@ func (s *Session) openStreamingChannel(ctx context.Context, id channelID) (ssh.C return nil, fmt.Errorf("error getting stream id: %w", err) } - span, ctx := opentracing.StartSpanFromContext(ctx, "Session.OpenChannel+SendRequest") + span, _ := opentracing.StartSpanFromContext(ctx, "Session.OpenChannel+SendRequest") defer span.Finish() channel, reqs, err := s.ssh.conn.OpenChannel("session", nil) diff --git a/internal/liveshare/port_forwarder.go b/internal/liveshare/port_forwarder.go index 56401cc4d..fcc7ba767 100644 --- a/internal/liveshare/port_forwarder.go +++ b/internal/liveshare/port_forwarder.go @@ -94,7 +94,7 @@ func (fwd *PortForwarder) shareRemotePort(ctx context.Context) (channelID, error if err != nil { err = fmt.Errorf("failed to share remote port %d: %w", fwd.remotePort, err) } - return id, nil + return id, err } func awaitError(ctx context.Context, errc <-chan error) error { diff --git a/internal/liveshare/session_test.go b/internal/liveshare/session_test.go index 47bac3108..c9a1be567 100644 --- a/internal/liveshare/session_test.go +++ b/internal/liveshare/session_test.go @@ -71,7 +71,7 @@ func TestServerStartSharing(t *testing.T) { testServer, session, err := makeMockSession( livesharetest.WithService("serverSharing.startSharing", startSharing), ) - defer testServer.Close() + defer testServer.Close() //nolint:stylecheck // httptest.Server does not return errors on Close() if err != nil { t.Errorf("error creating mock session: %w", err)