Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Reconnect throw exception but didn't return it to the method who wants to connect #133

Open
@assafAtStampli

Description

@assafAtStampli

Hi,

I would like to connect the deepstream and to get error\exception if the action failed after X times (accroding to config).
public static void main(String[] args) {
try {
DeepstreamClient deepstreamClient = new DeepstreamClient("localhost:6020");
deepstreamClient.login();
} catch (Exception e) {
e.printStackTrace();
}
System.out.print("End");
}

Exception in thread "Timer-10" io.deepstream.DeepstreamException: CONNECTION_ERROR: Connection refused: connect
at io.deepstream.DeepstreamClientAbstract.onError(DeepstreamClientAbstract.java:59)
at io.deepstream.Connection$1.run(Connection.java:194)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

But after X time, the thread throw exception but didn't return it to the main.
The method who call it stay alive without any response.
I think the login action should throw checked exception so we can to do something in case the deepstrem is down.

thanks,
Assaf

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