fastify / fastify-websocket

basic websocket support for fastify
MIT License
394 stars 72 forks source link

The close event callback function is not triggered. #297

Closed michael19900101 closed 4 months ago

michael19900101 commented 4 months ago

Prerequisites

Fastify version

4.0.0

Plugin version

10.0.1

Node.js version

20.10.6

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

mac os 13.3

Description

When the Android app, acting as a WebSocket client, loses its network connection, the close event callback function is not triggered on the Fastify server side when using the fastify-websocket plugin.

Link to code that reproduces the bug

No response

Expected Behavior

No response

mcollina commented 4 months ago

Thanks for reporting!

Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that.

(Please provide the reproduction using Node.js)