Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect is failing #232

Closed
LarryKanionga opened this issue Oct 19, 2018 · 10 comments
Closed

Reconnect is failing #232

LarryKanionga opened this issue Oct 19, 2018 · 10 comments
Assignees
Labels

Comments

@LarryKanionga
Copy link

LarryKanionga commented Oct 19, 2018

We are getting a client disconnect message immediately after the connection was successfully setup, this happens when the server is down and then comes to active

According to the traces, while the server is down, one connection channel is keep opened on port 8883.

When the server is restarted and it tries to reconnect (using mqttclient.connect), the connection is established and immediately the connection is closed after few milliseconds. This is also happening, when we call the disconnect message after the device notices that the server is down.

Any ideas? Thank you for the help.
I'm using CocoaMQTT 1.1.0 and iOS 11

Update:
Issue is reproducible in iOS 12

@enggjiten
Copy link

Hi,
I am facing same issue on iOS 12.

@hegdedhruvad
Copy link

CocoaMQTT - I m also facing problem in connecting (iOS 12)

@Mohit-Verma-2510
Copy link

CocoaMQTT - Connection Problem.
I am also facing problem in connecting only in iOS12 . Its working fine in other iOS version.
If its connected also but when i m publishing then its again giving disconnected.

@mayankbrang
Copy link

i am also facing same problem in connecting with cocoamqtt only in iOS12.

@kvdprasad99
Copy link

facing the same problem in connecting only in iOS12(cocoamqtt)

@HJianBo HJianBo self-assigned this Dec 27, 2018
@HJianBo
Copy link
Member

HJianBo commented May 3, 2019

Hi, guys. sorry for this bug. It may be caused by the original Timer mechanism.

@jmiltner has fixed the timer mechanism in the #246.

Could you check the auto-reconnect mechanism in the 1.2.0 version? I think it has been fixed!

@HJianBo HJianBo added the bug label May 3, 2019
@HJianBo
Copy link
Member

HJianBo commented May 9, 2019

@keshavx11 Can you provide the example code to help me to reproduce it? Thanks!

@HJianBo
Copy link
Member

HJianBo commented May 10, 2019

How do you test the re-connect mechanism?

@keshavx11
Copy link

Please ignore. The issue i have is because of #259
Not related to this

@HJianBo
Copy link
Member

HJianBo commented May 20, 2019

Close it. Pls reopen there if someone has reproduced it again.

@HJianBo HJianBo closed this as completed May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants