function IO(){
	var secure = window.location.protocol.match(/https/);
	var socket = this.socket = new io.Socket(window.location.hostname, {
			secure: secure,
			port: secure ? '' : window.location.port
			,reconnectionDelay: 2000 + Math.random() * 2000
		});

	var messageHandlers = [];

	this.processMessage = function(data){
		var stop;
		messageHandlers.forEach(function(handler){
			if(!stop) stop = handler.newMessage(data);
		});
	}
	
	this.addMessageHandler = function(handler){
		messageHandlers.push(handler);
	}
	
	this.connect = function(){
		socket.connect();
		socket.send({channel: channel, action: 'join', connector_id: connector_id});
	}
	
	socket.on('message', this.processMessage);
}

@@ -159,53 +159,8 @@
 %0A%09%09%09
-port: secure ? '' : window.location.port%0A%09%09%09,
 reco

Remove "port" setting for Socket.IO config It was messing up the websocket url in Firefox