Skip to content

Commit

Permalink
Merge pull request #587 from oceanprotocol/fix-node-crash-pipe
Browse files Browse the repository at this point in the history
fix node crash on stream, node internals
  • Loading branch information
paulo-ocean authored Aug 2, 2024
2 parents 40b86b8 + 0f6862c commit dc415f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/P2P/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ export class OceanP2P extends EventEmitter {
if (stream) {
response.stream = stream
try {
pipe(
await pipe(
// Source data
[uint8ArrayFromString(message)],
// Write to the stream, and pass its output to the next function
Expand Down
4 changes: 2 additions & 2 deletions src/test/integration/logs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('LogDatabase CRUD', () => {
const endTime = new Date() // current time

// Retrieve the latest log entries
let logs = await database.logs.retrieveMultipleLogs(startTime, endTime, 200)
let logs = await database.logs.retrieveMultipleLogs(startTime, endTime, 300)
logs = logs.filter((log) => log.message === newLogEntry.message)

expect(logs?.length).to.equal(1)
Expand Down Expand Up @@ -459,7 +459,7 @@ describe('LogDatabase retrieveMultipleLogs with pagination', () => {
})

it('should return empty results for a non-existent page', async () => {
const nonExistentPage = 100 // Assuming this page doesn't exist
const nonExistentPage = 300 // Assuming this page doesn't exist
const logs = await database.logs.retrieveMultipleLogs(
new Date(Date.now() - 10000), // 10 seconds ago
new Date(), // now
Expand Down

0 comments on commit dc415f6

Please sign in to comment.