diff --git a/assets/js/app.js b/assets/js/app.js index 516686a..4432fb5 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -191,6 +191,10 @@ Hooks.Ping = { }) this.ping(null) }, + reconnected(){ + clearTimeout(this.timer) + this.ping(null) + }, destroyed(){ clearTimeout(this.timer) }, ping(rtt){ this.nowMs = Date.now() diff --git a/config/dev.exs b/config/dev.exs index 51add3e..60fff1a 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -39,7 +39,7 @@ config :live_beats, LiveBeats.ReplicaRepo, config :live_beats, LiveBeatsWeb.Endpoint, # Binding to loopback ipv4 address prevents access from other machines. # Change to `ip: {0, 0, 0, 0}` to allow access from other machines. - http: [ip: {127, 0, 0, 1}, port: 4000], + http: [ip: {0, 0, 0, 0}, port: 4000], debug_errors: true, code_reloader: true, check_origin: false,