Skip to content

Commit 9b92445

Browse files
committed
minor
1 parent c9ad1e8 commit 9b92445

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

local.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/local.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ server = net.createServer (connection) ->
184184
return
185185

186186
connection.on "drain", ->
187-
ws.resume()
187+
ws._socket.resume()
188188

189189
connection.setTimeout timeout, ->
190190
console.log "local timeout"

src/server.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ wss.on "connection", (ws) ->
102102
console.log "remote disconnected"
103103

104104
remote.on "drain", ->
105-
ws.resume()
105+
ws._socket.resume()
106106

107107
remote.on "error", (e)->
108-
ws.close()
108+
ws.terminate()
109109
console.log "remote: #{e}"
110110

111111
remote.setTimeout timeout, ->
@@ -134,7 +134,7 @@ wss.on "connection", (ws) ->
134134
ws.pong '', null, true
135135

136136
ws._socket.on "drain", ->
137-
remote.resume() if remote
137+
remote.resume() if stage is 5
138138

139139
ws.on "close", ->
140140
console.log "server disconnected"

0 commit comments

Comments
 (0)