Skip to content

Commit

Permalink
fix: Terminate broken connections
Browse files Browse the repository at this point in the history
Fixes #58
  • Loading branch information
gnarea committed Aug 9, 2021
1 parent 0224602 commit df31554
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
14 changes: 3 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"devDependencies": {
"@relaycorp/relaynet-testing": "^1.3.0",
"@relaycorp/shared-config": "^1.5.3",
"@relaycorp/ws-mock": "^2.4.1",
"@relaycorp/ws-mock": "^2.5.0",
"@types/jest": "^26.0.24",
"@types/verror": "^1.10.5",
"@types/ws": "^7.4.7",
Expand Down
10 changes: 10 additions & 0 deletions src/lib/PoWebClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,16 @@ describe('collectParcels', () => {
expect(ackReceiver.message).toEqual(deliveryId);
});
});

describe('Pings', () => {
test.todo('Connection should be terminated if first ping is not received within 7s', async () => {

});

test.todo('Connection should be terminated if a subsequent ping is not received within 7s');

test.todo('Connection should be kept open if pings are received every < 7 seconds');
});
});

async function getRejection(promise: Promise<any>): Promise<Error> {
Expand Down

0 comments on commit df31554

Please sign in to comment.