delay socket.io client until db opened