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: add inactivity timeout
Date Tue, 04 Oct 2016 17:12:03 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  1f14f7b   add inactivity timeout
1f14f7b is described below

commit 1f14f7b53b82f9e336cdfcb3590256917fe94311
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Oct 4 13:11:41 2016 -0400

    add inactivity timeout
---
 www/board/agenda/daemon/wss.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/www/board/agenda/daemon/wss.rb b/www/board/agenda/daemon/wss.rb
index 618d4bf..ba3c205 100755
--- a/www/board/agenda/daemon/wss.rb
+++ b/www/board/agenda/daemon/wss.rb
@@ -19,6 +19,7 @@ options.port = 34234
 options.privkey = Dir['/etc/letsencrypt/live/*/privkey.pem'].first
 options.chain = Dir['/etc/letsencrypt/live/*/fullchain.pem'].first
 options.kill = false
+options.timeout = 900
 
 opt_parser = OptionParser.new do |opts|
   opts.banner = "Usage: #{File.basename(__FILE__)} [options]"
@@ -42,6 +43,10 @@ opt_parser = OptionParser.new do |opts|
   opts.on "--kill [SIGNAL]", 'Kill existing process' do |signal|
     options.kill = signal || 'INT'
   end
+
+  opts.on '-t', "--timeout [900]", 'inactivity timeout' do |timeout|
+    options.timeout = timeout.to_i
+  end
 end
 
 opt_parser.parse!(ARGV)
@@ -102,6 +107,7 @@ end
 EM.run do
   WebSocket::EventMachine::Server.start(server_options) do |ws|
     ws.onopen do |handshake|
+      ws.comm_inactivity_timeout = options.timeout
       clients << ws
     end
 

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

Mime
View raw message