Connect timeout issue in MQTT Client #1585
-
I have created an MQTT Client program which is working fine in Linux. When I compiled it for windows machine, if the client program fails to connect to server, it is not closing the connection. The connect() API inside mg_connect_resolved() is resulting in EWOULDBLOCK and it is keep trying for reconnecting instead of closing. But when I ran the same program in Linux, it simply close the connection with error message. Attaching the log here.
Is there anything needs to be specified for windows build to have a connect timeout? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
To implement connect timeout, see https://github.com/cesanta/mongoose/blob/master/examples/http-client/main.c The behavior seems to be correct. Could you attach a linux log as well, please? |
Beta Was this translation helpful? Give feedback.
-
I will make use of the timeout in http-client. Attaching the Linux log for your reference
|
Beta Was this translation helpful? Give feedback.
-
Please make an issue. This does not belong to discussions. |
Beta Was this translation helpful? Give feedback.
-
Sure. Thanks
…On Sun, Jun 12, 2022 at 8:19 PM Sergey Lyubka ***@***.***> wrote:
Please make an issue. This does not belong to discussions.
—
Reply to this email directly, view it on GitHub
<#1585 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV776SAFI3Y3JNGQPO3GFRLVOX2GNANCNFSM5YONRNIQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Best Regards,
Anoop M
|
Beta Was this translation helpful? Give feedback.
To implement connect timeout, see https://github.com/cesanta/mongoose/blob/master/examples/http-client/main.c
The behavior seems to be correct. Could you attach a linux log as well, please?