fix: Disable polling on custom domain, closes #2041

This commit is contained in:
Tom Moor
2021-04-18 18:58:26 -07:00
parent fa52bc5afd
commit ab267ce38d
2 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,10 @@ class SocketProvider extends React.Component<Props> {
// on reconnection, reset the transports option, as the Websocket
// connection may have failed (caused by proxy, firewall, browser, ...)
this.socket.on("reconnect_attempt", () => {
this.socket.io.opts.transports = ["polling", "websocket"];
this.socket.io.opts.transports =
auth.team && auth.team.domain
? ["websocket"]
: ["websocket", "polling"];
});
this.socket.on("authenticated", () => {