Skip to content

Commit

Permalink
feat: prefer ws over polling
Browse files Browse the repository at this point in the history
  • Loading branch information
pemrouz committed Sep 3, 2016
1 parent 697f560 commit d368bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ const headers = ripple => next => res => {

const io = opts => {
const r = !client ? require('socket.io')(opts.server || opts)
: window.io ? window.io()
: is.fn(require('socket.io-client')) ? require('socket.io-client')()
: window.io ? window.io({ transports: ['websocket', 'polling'] })
: is.fn(require('socket.io-client')) ? require('socket.io-client')({ transports: ['websocket', 'polling'] })
: { on: noop, emit: noop }
r.use = r.use || noop
return r
Expand Down

0 comments on commit d368bbe

Please sign in to comment.