Show error cause in websocket_server, trailing blanks.

Related to, but does not solve http://bugs.joindiaspora.com/issues/540.
This commit is contained in:
Alec Leamas 2010-11-18 14:51:47 +01:00
parent 9882fa183d
commit 4599f700e6

View file

@ -47,7 +47,8 @@ def package_js
begin begin
Jammit.package! Jammit.package!
rescue => e rescue => e
puts "Error minifying assets, but server will continue starting normally. Is Java installed on your system?" puts "Error minifying assets, but server will continue starting normally."
puts e.inspect
end end
end end
@ -67,7 +68,7 @@ begin
:cert_chain_file => APP_CONFIG[:socket_cert_chain_location] :cert_chain_file => APP_CONFIG[:socket_cert_chain_location]
} }
end end
EventMachine::WebSocket.start( socket_params ) do |ws| EventMachine::WebSocket.start( socket_params ) do |ws|
ws.onopen { ws.onopen {
@ -91,7 +92,7 @@ begin
ws.onclose { ws.onclose {
begin begin
debug_pp "In WSS, unsuscribing user: #{User.find(user_id).real_name} with id: #{user_id}" debug_pp "In WSS, unsuscribing user: #{User.find(user_id).real_name} with id: #{user_id}"
Diaspora::WebSocket.unsubscribe(user_id, sid) Diaspora::WebSocket.unsubscribe(user_id, sid)
rescue rescue
debug_pp "Could not unsubscribe socket for #{user_id}" debug_pp "Could not unsubscribe socket for #{user_id}"
end end