Skip to content

Commit

Permalink
#99 - Never require client to send back an acknowledgment for ws closure
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed Dec 14, 2012
1 parent 421b577 commit d94a2e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/trans-websocket.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class WebSocketReceiver extends transport.GenericReceiver
didClose: ->
super
try
@ws.close()
@ws.close(1000, "Normal closure", false)
catch x
@ws = null
@connection = null
Expand Down Expand Up @@ -130,7 +130,7 @@ class RawWebsocketSessionReceiver extends transport.Session
if @readyState isnt Transport.OPEN
return false
@readyState = Transport.CLOSING
@ws.close(status, reason)
@ws.close(status, reason, false)
return true

didClose: ->
Expand All @@ -139,7 +139,7 @@ class RawWebsocketSessionReceiver extends transport.Session
@ws.removeEventListener('message', @_message_cb)
@ws.removeEventListener('close', @_end_cb)
try
@ws.close()
@ws.close(1000, "Normal closure", false)
catch x
@ws = null

Expand Down

0 comments on commit d94a2e6

Please sign in to comment.