whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: trace websocket connect/disconnect
Date Fri, 14 Oct 2016 00:42:25 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  04f0212   trace websocket connect/disconnect
04f0212 is described below

commit 04f0212728c5ecd9e21edb2cd31eed3960562532
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Oct 13 20:42:02 2016 -0400

    trace websocket connect/disconnect
---
 www/board/agenda/views/models/events.js.rb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/board/agenda/views/models/events.js.rb b/www/board/agenda/views/models/events.js.rb
index 98ee7a2..ddcbd06 100644
--- a/www/board/agenda/views/models/events.js.rb
+++ b/www/board/agenda/views/models/events.js.rb
@@ -134,9 +134,17 @@ class Events
       self.dispatch event.data
     end
 
+    def @@socket.onerror(event)
+      console.log 'WebSocket connection terminated' unless @@socket
+      @@socket = nil
+    end
+
     def @@socket.onclose(event)
+      console.log 'WebSocket connection terminated' unless @@socket
       @@socket = nil
     end
+
+    console.log 'WebSocket connection established'
   rescue => e
     console.log e
   end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message