Skip to content

Commit

Permalink
fix: Work around #365
Browse files Browse the repository at this point in the history
  • Loading branch information
gnarea committed Jul 2, 2021
1 parent e8105a8 commit 4c3f2ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/daemon/src/server/poweb/parcelCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ function makeDeliveryStream(
): (parcelKeys: AsyncIterable<string>) => AsyncIterable<Buffer> {
return async function* (parcelKeys): AsyncIterable<Buffer> {
for await (const parcelKey of parcelKeys) {
// TODO: Undo this. See https://github.com/relaycorp/awala-gateway-desktop/issues/365.
// istanbul ignore next
if (socket.readyState !== socket.OPEN) {
// istanbul ignore next
break;
}

const parcelSerialized = await parcelStore.retrieve(
parcelKey,
MessageDirection.FROM_INTERNET,
Expand Down

0 comments on commit 4c3f2ea

Please sign in to comment.