Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mrluanma committed Jan 12, 2015
1 parent c9ad1e8 commit 9b92445
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion local.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/local.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ server = net.createServer (connection) ->
return

connection.on "drain", ->
ws.resume()
ws._socket.resume()

connection.setTimeout timeout, ->
console.log "local timeout"
Expand Down
6 changes: 3 additions & 3 deletions src/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ wss.on "connection", (ws) ->
console.log "remote disconnected"

remote.on "drain", ->
ws.resume()
ws._socket.resume()

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

remote.setTimeout timeout, ->
Expand Down Expand Up @@ -134,7 +134,7 @@ wss.on "connection", (ws) ->
ws.pong '', null, true

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

ws.on "close", ->
console.log "server disconnected"
Expand Down

0 comments on commit 9b92445

Please sign in to comment.