realtime shouldn't poll forever if the dev server isn't up (#931)
This commit is contained in:
parent
95b8b52224
commit
5d8ff3efce
1 changed files with 7 additions and 1 deletions
|
@ -111,7 +111,13 @@ let Realtime = {
|
||||||
|
|
||||||
self.addJuntoListeners()
|
self.addJuntoListeners()
|
||||||
|
|
||||||
self.socket = new SocketIoConnection({ url: serverData['REALTIME_SERVER'] })
|
self.socket = new SocketIoConnection({
|
||||||
|
url: serverData['REALTIME_SERVER'],
|
||||||
|
socketio: {
|
||||||
|
// don't poll forever if in development
|
||||||
|
reconnectionAttempts: serverData.RAILS_ENV === 'development' ? 5 : Infinity
|
||||||
|
}
|
||||||
|
})
|
||||||
self['junto_spinner_darkgrey.gif'] = serverData['junto_spinner_darkgrey.gif']
|
self['junto_spinner_darkgrey.gif'] = serverData['junto_spinner_darkgrey.gif']
|
||||||
|
|
||||||
self.socket.on('connect', function() {
|
self.socket.on('connect', function() {
|
||||||
|
|
Loading…
Reference in a new issue