Skip to content

Commit

Permalink
Handle WebSocket connection closing
Browse files Browse the repository at this point in the history
  • Loading branch information
dustalov committed Jan 13, 2013
1 parent e832599 commit 37c6bd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/goliath/websocket.rb
Expand Up @@ -59,6 +59,10 @@ def trigger_on_message(msg)
@parent.on_message(@env, msg) @parent.on_message(@env, msg)
end end


def close_connection
@connection_close.call
end

def close_connection_after_writing def close_connection_after_writing
@connection_close.call @connection_close.call
end end
Expand Down

0 comments on commit 37c6bd4

Please sign in to comment.