Skip to content

Commit

Permalink
Refresh the page periodically.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Appleton committed Mar 5, 2012
1 parent 8a5062f commit 8ac8a7b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/javascripts/application.coffee
Expand Up @@ -23,6 +23,11 @@ $ () ->

window.setInterval setDates, 30e3

# Socket.io seems to loose its connection occasionally and doesn't recover
# Refresh the page every 12 hours as a hacky way around this
reloadPage = -> window.location.reload()
window.setTimeout reloadPage, 432e5

App.socket.on 'connect', ->
App.Health().init()
App.Songs.init() if App.songsEnabled
Expand Down

0 comments on commit 8ac8a7b

Please sign in to comment.