Open abitofevrything opened 1 year ago
/cc @brianquinlan
I seem to have stumbled upon something related when trying to close web socket connections actively and noticed this line in the close
implementation of websockets: https://github.com/dart-lang/sdk/blob/0c9067c626f62b953bd8761628a46320b693716f/sdk/lib/_http/websocket_impl.dart#L1255
For my knowledge:
Calling
cancel()
on a subscription to a WebSocket - before or afterclose()
is called on the same websocket - makes the isolate containing the websocket stay alive for an extra 5 seconds after the websocket & subscription are closed & cancelled (assuming the connection is the only thing keeping the isolate alive).To reproduce:
Output: