thedjpetersen / subway

ABANDONED - A web based IRC client
1.47k stars 152 forks source link

Cannot read property 'clients' of undefined #363

Open twk3 opened 10 years ago

twk3 commented 10 years ago

This is the error I get on master when I join the #gitlab channel on freenode

Unhandled message: { prefix: 'services.',
  server: 'services.',
  command: '328',
  rawCommand: '328',
  commandType: 'normal',
  args: [ 'twk3', '#gitlab', 'http://www.gitlab.com/' ] }
{ prefix: 'services.',
  server: 'services.',
  command: '328',
  rawCommand: '328',
  commandType: 'normal',
  args: [ 'twk3', '#gitlab', 'http://www.gitlab.com/' ],
  client_server: 'card.freenode.net' }

/home/dmountney/repo/subway/lib/connection.js:119
    connections[user.username] = {clients: socket.clients, irc_conn: socket.ir
                                                 ^
TypeError: Cannot read property 'clients' of undefined
    at restore_connection (/home/dmountney/repo/subway/lib/connection.js:119:50)
    at /home/dmountney/repo/subway/lib/connection.js:157:11
    at /home/dmountney/repo/subway/node_modules/jugglingdb/lib/model.js:604:9
    at /home/dmountney/repo/subway/node_modules/jugglingdb/lib/model.js:504:13
    at SQLite3.<anonymous> (/home/dmountney/repo/subway/node_modules/jugglingdb-sqlite3/lib/sqlite3.js:304:13)
    at Statement.<anonymous> (/home/dmountney/repo/subway/node_modules/jugglingdb-sqlite3/lib/sqlite3.js:53:16)

npm ERR! subway@0.3.5 start: `./subway.js`
npm ERR! Exit status 8
twk3 commented 10 years ago

Problem re-occurs after npm start, then joining again, but went away after I logged out/logged back into subway.