Skip to content

Commit

Permalink
Fix #104 get rid of unused parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
brycekahle committed Oct 22, 2014
1 parent b6aca87 commit 96ae8ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/trans-websocket.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class WebSocketReceiver extends transport.GenericReceiver
try
message = JSON.parse(payload)
catch x
return @didClose(1002, 'Broken framing.')
return @session.close(1002, 'Broken framing.')
if payload[0] is '['
for msg in message
@session.didMessage(msg)
Expand Down
10 changes: 5 additions & 5 deletions src/transport.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class GenericReceiver
@setUp(@thingy)

setUp: ->
@thingy_end_cb = () => @didAbort(1006, "Connection closed")
@thingy_end_cb = () => @didAbort()
@thingy.addListener('close', @thingy_end_cb)
@thingy.addListener('end', @thingy_end_cb)

Expand All @@ -246,18 +246,18 @@ class GenericReceiver
@thingy.removeListener('end', @thingy_end_cb)
@thingy_end_cb = null

didAbort: (status, reason) ->
didAbort: ->
session = @session
@didClose(status, reason)
@didClose()
if session
session.didTimeout()

didClose: (status, reason) ->
didClose: ->
if @thingy
@tearDown(@thingy)
@thingy = null
if @session
@session.unregister(status, reason)
@session.unregister()

doSendBulk: (messages) ->
q_msgs = for m in messages
Expand Down

0 comments on commit 96ae8ed

Please sign in to comment.