I use "CloseOutputAsync" on the C# client to initiate the close handshake with the Node.js server.
My Node.js server receives a "close" event and immediately sets his "websocket.readyState" as "CLOSED" without going through "CLOSING".
As my C# client is sending the close handshake, he sets his state as "CloseSent".
The problem is that my C# stays in this state, while my Node.js server believes that the websocket connection is closed.
How can I detect that the connection is "CLOSING" on the server and what function of the ws library can I use to send an acknoledgment to the C# client to make sure that his state goes from "CloseSent" to "Closed" ?
I am using the standard "ws" library under Node.js and the standard "System.Net.WebSockets" under C#.