Skip to content

socket connect to a unreachable ip caused the app crashed! #600

@FusEcho

Description

@FusEcho

I use the PUB/SUB,subcriber to bind while the publicher to connect.
EXCEPTION=java.net.SocketTimeoutException: failed to connect to /192.168.2.88 (port 9900): isConnected failed: ETIMEDOUT (Connection timed out)
My device ip address is 172.10.0.21,while I want edit to connect to a unreachable ip 192.168.2.88 or any address else.this will cause my app crashing which I can‘t catch。and when I try to check like this
if(publisher.connect("tcp://192.168.2.88:9900")){},which always return true immediately.can you just offer any suggestion for this problem.thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions