{"version":"2.1.221","anchor":"chrome-bridge-takes-an-injected-websocket-factory-and-closes","canonical_anchor":"chrome-bridge-takes-an-injected-websocket-factory-and-closes","heading":"Chrome bridge takes an injected WebSocket factory and closes cleanly","tier":"notice","area":"Chrome & Browser","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221\/e\/chrome-bridge-takes-an-injected-websocket-factory-and-closes","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221","markdown":"### Chrome bridge takes an injected WebSocket factory and closes cleanly\n\nFixes the Chrome bridge leaving half-open connections behind when it shuts down.\n\n**What**\n\nThe bridge connector can be handed its socket constructor, and teardown no longer leaves non-open sockets to terminate().\n\n**Details**\n\n- Uses a caller-supplied `createWebSocket` when present, otherwise constructs the ws client itself.\n- On teardown it detaches listeners and then always calls `close()`, rather than terminating sockets that are not in the OPEN state.\n\n**Evidence**\n\n`chrome_bridge_connection_started`\n\n- Area: Chrome & Browser\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 0\/5"}