Closed catmando closed 7 years ago
This patch seems to take of the problem:
class OpalHotReloader def connect_to_websocket(port) host = `window.location.host`.sub(/:\d+/, '') host = '127.0.0.1' if host == '' protocol = `window.location.protocol` == 'https:' ? 'wss:' : 'ws:' ws_url = "#{host}:#{port}" puts "Hot-Reloader connecting to #{ws_url}" ws = `new WebSocket(#{protocol} + '//' + #{ws_url})` `#{ws}.onmessage = #{lambda { |e| reload(e) }}` # every(5) { `#{ws}.ping()` } every(5) { `#{ws}.send('')` } # seems like ping is not implemented end end
This patch seems to take of the problem: