Skip to content

Commit 84c626a

Browse files
authored
chore: remove code for 0.12 backwards compatibility in protocol support (#5622)
1 parent f449ae5 commit 84c626a

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

internal/daemon/worker/handler.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,10 @@ import (
3030
"github.com/hashicorp/nodeenrollment"
3131
"github.com/hashicorp/nodeenrollment/types"
3232
"google.golang.org/protobuf/proto"
33-
"google.golang.org/protobuf/types/known/anypb"
3433
"google.golang.org/protobuf/types/known/timestamppb"
3534
"nhooyr.io/websocket"
3635
)
3736

38-
var GetProtocolContext = nilProtocolContext
39-
40-
func nilProtocolContext(context.Context, string, session.Session, string) (*anypb.Any, error) {
41-
return nil, nil
42-
}
43-
4437
type HandlerProperties struct {
4538
ListenerConfig *listenerutil.ListenerConfig
4639
}
@@ -267,14 +260,6 @@ func (w *Worker) handleProxy(listenerCfg *listenerutil.ListenerConfig, sessionMa
267260
return
268261
}
269262
protocolCtx := acResp.GetProtocolContext()
270-
if protocolCtx == nil {
271-
// TODO: Remove this if block once pre v0.12.0 controllers are no longer supported.
272-
if protocolCtx, err = GetProtocolContext(ctx, workerId, sess, endpointUrl.Scheme); err != nil {
273-
conn.Close(proxyHandlers.WebsocketStatusProtocolSetupError, "unable to get proxy context")
274-
event.WriteError(ctx, op, err)
275-
return
276-
}
277-
}
278263

279264
pDialer, err := proxyHandlers.GetEndpointDialer(ctx, endpointUrl.Host, workerId, acResp, w.downstreamReceiver, proxyHandlers.WithDnsServerAddress(w.conf.WorkerDnsServer))
280265
if err != nil {

0 commit comments

Comments
 (0)