It's not ideal for putting this variable into  the SocketIOConnection object from single responsibility OO principle.and this variable is somewhat dealing with if we not setting this static,please you have a try?