uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.86k stars 569 forks source link

Error: socket hang up v20.10.0 => v20.11-14.0 #820

Closed N0N1m3 closed 1 year ago

N0N1m3 commented 1 year ago

Problem:

For sport, I sent a get request with a json body (of course, I know that this not allowed, but for sport)

In version v20.14.0, I receive a response from the server one by one: (this happens cyclically)

  1. Everything is ok for the first time
  2. The second time I get an error (in my case in postman) (Error: socket hang up)

In version v20.10.0 everything works fine, I get a response every time.

After testing other versions, I realized that this problem appeared with version v20.11.0

It's normal?

Test code:

Tested on Windows, Node.js 18.

With:

  1. uWebSockets.js (v20.10.0)
  2. uWebSockets.js (v20.11.0)
  3. uWebSockets.js (v20.14.0)
import  { App }  from  "uWebSockets.js";

App()

    .get("/",  (res, req)  => res.end("hi"))

    .listen(9000,  ()  =>  {

        console.log("Server start");

    });

image

image

uNetworkingAB commented 1 year ago

You are hitting an edge case that is fixed in the main repo. This JS wrapper is lagging a bit behind but it will be fixed whenever next release drops

uNetworkingAB commented 1 year ago

Please try v20.15.0 should be fixed

N0N1m3 commented 1 year ago

Yeap, fixed in v20.15.0, thx for support