I was testing consumption of some data streams, and it was a learning process. While doing it, I instantiated a WebSocket$new() but while developing it I created objects, they failed (my mistakes). SFSG, learning is fun.
Unfortunately, I didn't realize that while my code failed, the onMessage functions were still registered, and despite the fact that my websocket object was removed, I hadn't registered $finalize(), so the cnxOnMessage() cancellation functions were not triggered. Again, my mistake. It took me a few minutes to realize why every line of streaming data was being written to file 16 times :-(
In other areas, I take a peek at later:::list_queue() to do manual cleanup when I mis-manage a cnx-function, but I could not find the websocket loop for its handling. While I've since added the $finalize() function to deregister $onMessage(), I wonder if there is any canonical way to view the private loop, potentially finding their IDs to cleanup the mess I created?
I was testing consumption of some data streams, and it was a learning process. While doing it, I instantiated a
WebSocket$new()but while developing it I created objects, they failed (my mistakes). SFSG, learning is fun.Unfortunately, I didn't realize that while my code failed, the
onMessagefunctions were still registered, and despite the fact that my websocket object was removed, I hadn't registered$finalize(), so thecnxOnMessage()cancellation functions were not triggered. Again, my mistake. It took me a few minutes to realize why every line of streaming data was being written to file 16 times :-(In other areas, I take a peek at
later:::list_queue()to do manual cleanup when I mis-manage a cnx-function, but I could not find the websocket loop for its handling. While I've since added the$finalize()function to deregister$onMessage(), I wonder if there is any canonical way to view the private loop, potentially finding their IDs to cleanup the mess I created?