@@ -86,12 +86,12 @@ export class EngineActorDriver implements ActorDriver {
8686 const runnerConfig : RunnerConfig = {
8787 version : this . #version,
8888 endpoint : config . endpoint ,
89+ token : config . token ,
8990 pegboardEndpoint : config . pegboardEndpoint ,
9091 namespace : config . namespace ,
9192 totalSlots : config . totalSlots ,
9293 runnerName : config . runnerName ,
9394 runnerKey : config . runnerKey ,
94- token : config . token ,
9595 metadata : {
9696 inspectorToken : this . #runConfig. inspector . token ( ) ,
9797 } ,
@@ -304,15 +304,13 @@ export class EngineActorDriver implements ActorDriver {
304304
305305 const url = new URL ( request . url ) ;
306306
307+ // Parse configuration from Sec-WebSocket-Protocol header
307308 const protocols = request . headers . get ( "sec-websocket-protocol" ) ;
308309 if ( protocols === null )
309310 throw new Error ( `Missing sec-websocket-protocol header` ) ;
310311
311- // Parse configuration from Sec-WebSocket-Protocol header
312- const protocols = request . headers . get ( "sec-websocket-protocol" ) ;
313312 let encodingRaw : string | undefined ;
314313 let connParamsRaw : string | undefined ;
315- let token : string | undefined ;
316314
317315 if ( protocols ) {
318316 const protocolList = protocols . split ( "," ) . map ( ( p ) => p . trim ( ) ) ;
@@ -323,8 +321,6 @@ export class EngineActorDriver implements ActorDriver {
323321 connParamsRaw = decodeURIComponent (
324322 protocol . substring ( WS_PROTOCOL_CONN_PARAMS . length ) ,
325323 ) ;
326- } else if ( protocol . startsWith ( WS_PROTOCOL_TOKEN ) ) {
327- token = protocol . substring ( WS_PROTOCOL_TOKEN . length ) ;
328324 }
329325 }
330326 }
0 commit comments