Permalink
Browse files

[fix] Don't call undefined callbacks

  • Loading branch information...
1 parent 60744b1 commit 7ad0f3ad60ff97ffc80f8324608c7d47184db789 @Marak Marak committed Jul 18, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/engines/socketio.js
View
@@ -2,7 +2,9 @@ var engine = exports;
engine.createServer = function (resources, options, callback) {
var io = require('socket.io').listen(options.server || 8000, function(){
- callback(null, io);
+ if (callback) {
+ callback(null, io);
+ }
});
io.sockets.on('connection', function (socket) {

0 comments on commit 7ad0f3a

Please sign in to comment.