MetinSeylan / Vue-Socket.io

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

Vue component listening for failed connection when the component is mounted first #268

Closed Geowan closed 4 years ago

Geowan commented 4 years ago

Currently i can listen to socket disconnects in vue component via

   export default{
        sockets: {

           connect() {
             console.log("socket connected...");
           },

           disconnect() {
             console.log("socket disconnected...")
           }
        },

   }

The above works for when connection is connected and when disconnected after compoent is loaded. But if the socket connection fails before the component is loaded eg: when a page is refreshed with a wrong socket url, disconnect doesnt work (log)

How can i listen for failing connection when page is first loaded.

Geowan commented 4 years ago

Why have you closed this without a solutions to an issue?