Giter Club home page Giter Club logo

Comments (6)

piliugin-anton avatar piliugin-anton commented on May 25, 2024

I found out that offset in drain and lastOffset is the same value

from hyper-express.

kartikk221 avatar kartikk221 commented on May 25, 2024

Yeah, I used to actually have that sliced chunk being served for backpressuring but it's a very weird implementation and it turned out that chunk slicing was not needed because the write() method buffers the chunk under the hood anyways. So essentially, you should serve the next chunk after backpressure relieves rather than serve the same chunk but sliced. If you find this behavior to be incorrect, feel free to link the test code to recreate the bug in hyper-express and I'd be glad to push a fix.

from hyper-express.

piliugin-anton avatar piliugin-anton commented on May 25, 2024

The issue is stream hangs on slow internet connection when streaming a few megabytes in few files. I'm using this method stream to stream static files, the issue appears when I'm testing it on a production server over internet. So you may try to reproduce it by serving multiple large images over network (you may try to throttle the bandwidth in browser devtools). It may appear in future when you will be developing a middleware for static files serving

from hyper-express.

kartikk221 avatar kartikk221 commented on May 25, 2024

I see, I'll try to recreate this myself. If you end up writing a snippet to simulate this bug with high probability feel free to share.

from hyper-express.

piliugin-anton avatar piliugin-anton commented on May 25, 2024

I think i finally fixed this method issues for both: streams with size and without size

from hyper-express.

kartikk221 avatar kartikk221 commented on May 25, 2024

I think i finally fixed this method issues for both: streams with size and without size

Great! Feel free to make a PR and I'd be glad to have it implemented.

from hyper-express.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.