From af3578580a2edab9b2d23ccd201be7d93619e878 Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Sat, 1 Jun 2013 09:14:07 -0700 Subject: [PATCH] Return after closing websocket in flush. Prevent trying to access properties on a possibly undefined value. See #9009 --- proxy/flashproxy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js index 237c629..db2d070 100644 --- a/proxy/flashproxy.js +++ b/proxy/flashproxy.js @@ -793,10 +793,12 @@ function ProxyPair(client_addr, relay_addr, rate_limit) { if (is_closed(this.relay_s) && !is_closed(this.client_s) && this.client_s.bufferedAmount === 0 && this.r2c_schedule.length === 0) { log("Client: closing."); this.client_s.close(); + return; } if (is_closed(this.client_s) && !is_closed(this.relay_s) && this.relay_s.bufferedAmount === 0 && this.c2r_schedule.length === 0) { log("Relay: closing."); this.relay_s.close(); + return; } if (this.r2c_schedule.length > 0 || this.client_s.bufferedAmount > 0 -- 1.8.3