Skip to content

Commit

Permalink
fix(server): fix socket server not attaching
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Aug 23, 2020
1 parent 93f181e commit 519a6b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/socketserver/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const socketServer = ({

app.use(baseUrl, router);

const socketio = io(server, {
path: urljoin(baseUrl, '/socket.io'),
const socketio = io({
serveClient: false,
cookie: false,
// Use websockets first
Expand All @@ -33,6 +32,10 @@ const socketServer = ({

attachEventHandlers({ server: socketio, pingInterval });

socketio.attach(server, {
path: urljoin(baseUrl, '/socket.io'),
});

// Setup our router
if (staticPath) {
console.log('Serving static files at', staticPath);
Expand Down

0 comments on commit 519a6b0

Please sign in to comment.