oatpp / oatpp-websocket

oatpp-websocket submodule.
https://oatpp.io/
Apache License 2.0
78 stars 32 forks source link

Closing lost connection #28

Closed mgandler closed 3 years ago

mgandler commented 3 years ago

Hi,

I am trying to solve the following scenario using oatpp-websocket:

Is there a way to tell the AsyncWebSocket::Listener to close its connection and onBeforeDestroy_NonBlocking is called so I can remove the connection from the managment class.

Thanks Martin

lganzzzo commented 3 years ago

Hello @mgandler ,

An example of this is implemented in this example repo particularly this line

You have to call ConnectionProvider::invalidate(<conntection>). Make sure to call exactly the same provider which issued that connection.

Regards, Leonid

mgandler commented 3 years ago

Hello @lganzzzo,

thank you for the quick response. I totally missed this function in the example.

BR Martin