MetinSeylan / Vue-Socket.io

😻 Socket.io implementation for Vuejs and Vuex
https://metin.sh
MIT License
3.95k stars 496 forks source link

VueSocketIOListener miss #264

Closed JieenZhang closed 4 years ago

JieenZhang commented 4 years ago

Describe the bug if call $vueSocketIo.connect must be renew VueSocketIOListener.

connect (connection, options) { if (connection && typeof connection === 'object') { Logger.info(Received socket.io-client instance) return connection } else if (typeof connection === 'string') { const io = SocketIO(connection, options) Logger.info(Received connection string) this.listener = new Listener(io, this.emitter) return (this.io = io) } else { throw new Error('Unsupported connection type') } } Expected behavior call $vueSocketIo.connect

Desktop (please complete the following information):