nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.62k stars 7.62k forks source link

sse close event not trigger #13956

Closed wenghongtian closed 1 month ago

wenghongtian commented 1 month ago

Is there an existing issue for this?

Current behavior

sse close event not trigger

Minimum reproduction code

https://github.com/wenghongtian/nest-sse

Steps to reproduce

  1. pnpm i
  2. pnpm start
  3. call 'http://localhost:3004/api/workflow/sse/application/run' with sse and post method
  4. close the connect
  5. req.on('close', () => { console.log('request closed'); }); not trigger

Expected behavior

When the socket is closed, 'close' event can trigger

Package

Other package

No response

NestJS version

No response

Packages versions

[System Information] OS Version : macOS 23.1.0 NodeJS Version : v20.12.2 PNPM Version : 8.14.3

[Nest CLI] Nest CLI Version : 10.4.2

[Nest Platform Information] platform-express version : 10.3.10 microservices version : 10.3.10 platform-ws version : 10.3.10 websockets version : 10.3.10 schematics version : 10.1.2 throttler version : 5.2.0 passport version : 10.0.3 swagger version : 7.4.0 testing version : 10.3.10 common version : 10.3.10 config version : 3.2.3 axios version : 3.0.2 core version : 10.3.10 jwt version : 10.2.0 cli version : 10.4.2

Node.js version

20.12.2

In which operating systems have you tested?

Other

No response

micalevisk commented 1 month ago

maybe related with this issue: #10389

kamilmysliwiec commented 1 month ago

Duplicate https://github.com/nestjs/nest/issues/10389