max-mapper / max-mapper/websocket-stream

The stream loses data

Open
#139 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
667
Forks
110
PR merge metrics
No merged PRs in 30d

Description

In this use case we send a file. All data are lost if the file is small, or received partially if the file is big.

How to reproduce:

const fs = require('fs')
const reader = fs.ReadStream('index.js')
const writer = fs.WriteStream('out')
const socket = require('websocket-stream')('ws://echo.websocket.org')

reader.pipe(socket).pipe(writer)

// Now compare the size of the input and output files

Node.js v8.6.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the issue's Node.js reproduction with websocket-stream, comparing the input and output file sizes. Trace the stream handling used by reader.pipe(socket).pipe(writer); done means the output file contains the complete input for both small and large files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.