Permalink
Browse files

Merge pull request #223 from ustalov/websocket-closing

Handle WebSocket connection closing
  • Loading branch information...
2 parents e832599 + e47753e commit c1d250b6be9203f8d2fa710089e83b11f10350e6 @igrigorik igrigorik committed Feb 15, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/goliath/websocket.rb
View
4 lib/goliath/websocket.rb
@@ -59,6 +59,10 @@ def trigger_on_message(msg)
@parent.on_message(@env, msg)
end
+ def close_connection
+ @env[STREAM_CLOSE].call
+ end
+
def close_connection_after_writing
@connection_close.call
end

1 comment on commit c1d250b

Please sign in to comment.