Skip to content

The loss of IP address on the client side will cause the program to crash #565

Description

@madao10037

After establishing a connection between the MQTT client and the server, if the client's network becomes unstable and the IP is lost, it may cause the program to crash:
/**********************************************************************************/
gdb run sample/async_subscribe.cpp

Connection success

Subscribing to topic 'test/pqq'
for client paho_cpp_async_subscribe using QoS1

Press Q to quit

Subscription success for token: [1]
token topic: 'test/pqq', ...

Program received signal SIGPIPE, Broken pipe.
[Switching to LWP 2998]
0x0000007ff3e4f518 in writev () from /apex/com.android.runtime/lib64/bionic/libc.so
(gdb) bt
#0 0x0000007ff3e4f518 in writev () from /apex/com.android.runtime/lib64/bionic/libc.so
#1 0x000000555557c108 in ?? ()
#2 0x000000555557c604 in ?? ()
#3 0x000000555557f594 in ?? ()
#4 0x000000555557194c in ?? ()
#5 0x0000005555571e3c in ?? ()
#6 0x0000005555570388 in ?? ()
#7 0x00000055555702cc in ?? ()
#8 0x0000005555570154 in ?? ()
#9 0x000000555556e4cc in MQTTAsync_receiveThread ()
#10 0x0000007ff3e63814 in __pthread_start(void*) () from /apex/com.android.runtime/lib64/bionic/libc.so
#11 0x0000007ff3e032f4 in __start_thread () from /apex/com.android.runtime/lib64/bionic/libc.so
(gdb)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions