Proposed potential bug fixes
Proposed potential bug fixes

Changed those code initiating websocket into a function init_websocket;  changed recovery using the newly created init_websocket
Charcoal-SE/SmokeDetector,Charcoal-SE/SmokeDetector