Skip to content

Commit 066e4dd

Browse files
committed
wip: fixing up PolykeyAgent
[ci skip]
1 parent 265a4a9 commit 066e4dd

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/PolykeyAgent.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ class PolykeyAgent {
456456
optionsDefaulted.rpc.parserBufferSize,
457457
),
458458
sensitive: false,
459-
handlerTimeoutTime: networkConfig_.handlerTimeoutTime,
460-
handlerTimeoutGraceTime: networkConfig_.handlerTimeoutGraceTime,
459+
handlerTimeoutTime: optionsDefaulted.rpc.callTimeoutTime,
460+
handlerTimeoutGraceTime: optionsDefaulted.rpc.callTimeoutTime + 2000,
461461
logger: logger.getChild(RPCServer.name + 'Client'),
462462
});
463463
}
@@ -466,12 +466,13 @@ class PolykeyAgent {
466466
(await WebSocketServer.createWebSocketServer({
467467
connectionCallback: (rpcStream) =>
468468
rpcServerClient!.handleStream(rpcStream),
469-
host: networkConfig_.clientHost,
470-
port: networkConfig_.clientPort,
469+
host: optionsDefaulted.clientServiceHost,
470+
port: optionsDefaulted.clientServicePort,
471471
tlsConfig,
472-
maxIdleTimeout: networkConfig_.maxIdleTimeout,
473-
pingIntervalTime: networkConfig_.pingIntervalTime,
474-
pingTimeoutTimeTime: networkConfig_.pingTimeoutTimeTime,
472+
// FIXME: Not sure about this, maxIdleTimeout doesn't seem to be used?
473+
maxIdleTimeout: optionsDefaulted.client.keepAliveTimeoutTime,
474+
pingIntervalTime: optionsDefaulted.client.keepAliveIntervalTime,
475+
pingTimeoutTimeTime: optionsDefaulted.client.keepAliveTimeoutTime,
475476
logger: logger.getChild('WebSocketServer'),
476477
}));
477478
if (rpcServerAgent == null) {
@@ -490,11 +491,11 @@ class PolykeyAgent {
490491
}),
491492
middlewareFactory: rpcUtilsMiddleware.defaultServerMiddlewareWrapper(
492493
undefined,
493-
networkConfig_.clientParserBufferByteLimit,
494+
optionsDefaulted.rpc.parserBufferSize,
494495
),
495496
sensitive: true,
496-
handlerTimeoutTime: networkConfig_.handlerTimeoutTime,
497-
handlerTimeoutGraceTime: networkConfig_.handlerTimeoutGraceTime,
497+
handlerTimeoutTime: optionsDefaulted.rpc.callTimeoutTime,
498+
handlerTimeoutGraceTime: optionsDefaulted.rpc.callTimeoutTime + 2000,
498499
logger: logger.getChild(RPCServer.name + 'Agent'),
499500
});
500501
}
@@ -769,8 +770,7 @@ class PolykeyAgent {
769770
});
770771
await this.nodeManager.start();
771772
await this.nodeConnectionManager.start({
772-
host: option
773-
nodeManager: this.nodeManager,
773+
host: optionss,
774774
handleStream: (stream) => this.rpcServerAgent.handleStream(stream),
775775
});
776776
await this.nodeGraph.start({ fresh });

src/nodes/NodeConnectionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class NodeConnectionManager {
281281
}
282282

283283
public async start({
284-
host = '::' as Host, // FIXME: Should just be string and number
284+
host = '::' as Host,
285285
port = 0 as Port,
286286
reuseAddr = false,
287287
ipv6Only = false,

0 commit comments

Comments
 (0)