Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/PolykeyAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ class PolykeyAgent {
optionsDefaulted.nodes.connectionInitialMaxStreamsBidi,
rpcParserBufferSize: optionsDefaulted.nodes.rpcParserBufferSize,
rpcCallTimeoutTime: optionsDefaulted.nodes.rpcCallTimeoutTime,
authenticateNetworkForwardCallback:
nodesUtils.nodesAuthenticateConnectionForwardBasicPublicFactory(
optionsDefaulted.network,
),
authenticateNetworkReverseCallback:
nodesUtils.nodesAuthenticateConnectionReverseBasicPublicFactory(
optionsDefaulted.network,
),
logger: logger.getChild(NodeConnectionManager.name),
});
nodeManager = new NodeManager({
Expand Down
3 changes: 2 additions & 1 deletion src/client/ClientService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class ClientService {
const conn = evt.detail;
const streamHandler = (evt: wsEvents.EventWebSocketConnectionStream) => {
const stream = evt.detail;
// If the RPCServer is stopping or stopped then we want to reject new streams outright
if (!this.rpcServer[running] || this.rpcServer[status] === 'stopping') {
stream.cancel(Error('TMP RPCServer not running'));
stream.cancel(new errors.ErrorClientServiceNotRunning());
return;
}
this.rpcServer.handleStream(stream);
Expand Down
Loading