Skip to content

Commit

Permalink
Merge pull request #2259 from botpress/ya-fix-socket
Browse files Browse the repository at this point in the history
fix(socket): using websocket first (fallback polling)
  • Loading branch information
slvnperron committed Aug 16, 2019
2 parents eaca91e + b0259e4 commit f9529be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bp/ui-studio/src/web/util/EventBus.ts
Expand Up @@ -59,10 +59,10 @@ class EventBus extends EventEmitter2 {

const socketUrl = window['BP_SOCKET_URL'] || window.location.origin

this.adminSocket = io(socketUrl + '/admin', { query })
this.adminSocket = io(socketUrl + '/admin', { query, transports: ['websocket', 'polling'] })
this.adminSocket.on('event', this.dispatchSocketEvent)

this.guestSocket = io(socketUrl + '/guest', { query })
this.guestSocket = io(socketUrl + '/guest', { query, transports: ['websocket', 'polling'] })
this.guestSocket.on('event', this.dispatchSocketEvent)
}
}
Expand Down

0 comments on commit f9529be

Please sign in to comment.