Socket IO Client Manager is released

I have error in socket io swift .I socket server is not connect because manager is released??

You can see the console error How to fix it??
08 PM

Hi @muhammadali

Seems to me that you are trying to send a message while connection to a socket server wasn’t finished/initialized. Are you sure your connection is properly working?

Nikita

Hi @muhammadali,
I believe it could be related with the variable reference, you need a strong reference, I think it is released and then when you try to send a message, it fails.

https://nuclearace.github.io/Socket.IO-Client-Swift/Classes/SocketManager.html

The document also suggests the same.

The other issue (if you have a strong reference) is that if the socket has a strong reference and is already open, then trying to open a new socket will not work. So you will have to close a socket before you open it again.

cheers,

Jayant

thanks jayantvarma for your time.

This topic was automatically closed after 166 days. New replies are no longer allowed.