Skip to content

Commit

Permalink
fix(gen:app:socket): use '' instead null as URL to open ioSocket
Browse files Browse the repository at this point in the history
With socket.io 1.0.6, when opening ioSocket with null as URL, io() will
omit the option object. As a result, `query` and Auth Token will not be
sent through handshake.
  • Loading branch information
gregwym committed Aug 11, 2014
1 parent f5ca531 commit 0f0d0fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ angular.module '<%= scriptAppName %>'
.factory 'socket', (socketFactory) ->

# socket.io now auto-configures its connection when we omit a connection url
ioSocket = io null,
ioSocket = io '',
'reconnection limit': 10 * 1000
# Send auth token on connection, you will need to DI the Auth service above
# 'query': 'token=' + Auth.getToken()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ angular.module('<%= scriptAppName %>')
.factory('socket', function(socketFactory) {

// socket.io now auto-configures its connection when we ommit a connection url
var ioSocket = io(null, {
var ioSocket = io('', {
// Send auth token on connection, you will need to DI the Auth service above
// 'query': 'token=' + Auth.getToken()
});
Expand Down

0 comments on commit 0f0d0fd

Please sign in to comment.