Application stuck when connection timeout

83 views
Skip to first unread message

Eyal Muchtar

unread,
Oct 22, 2013, 5:06:09 PM10/22/13
to codenameone...@googlegroups.com
Hi
In my code I'm using -

connRequest.setTimeout(5000);
networkManager
.addToQueueAndWait(connRequest);

When running on Android device and get -
E/GCMDemo(3381): java.net.ConnectException: failed to connect to /23.23.229.104 (port 80): connect failed: ETIMEDOUT (Connection timed out)

Application never come back and get stuck.
How it can be fixed?

Shai Almog

unread,
Oct 23, 2013, 3:01:43 AM10/23/13
to codenameone...@googlegroups.com
Hi,
do you show a progress dialog which never goes away?
How do you show/dispose it?

Eyal Muchtar

unread,
Oct 23, 2013, 3:11:01 AM10/23/13
to codenameone-discussions
Hi Shay,
I'm using Dialog that displayed by the following code:

        Dialog dlg = UiUtils.showDialog("Loading", "Data / Image Processing...", true);
        connRequest.setDisposeOnCompletion(dlg);
        networkManager.addToQueueAndWait(connRequest);
        resBytes = connRequest.getResponseData();

When getting timeout the dialog is still displayed and never disappeared.


--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/hsEQahduXL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/e107bb97-4b3a-4c5d-b7da-ca0d0340fc7d%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Sincerely,

Eyal Muchtar
EM-PROJECTS
+972-52-2405134
ey...@em-projects.com
Skype: eyalm_nm

Shai Almog

unread,
Oct 23, 2013, 3:24:17 AM10/23/13
to codenameone...@googlegroups.com
I see an issue there, I'll fix it.

Eyal Muchtar

unread,
Oct 23, 2013, 3:26:28 AM10/23/13
to codenameone...@googlegroups.com
Thanks.
Keep me updated.



On Wed, Oct 23, 2013 at 10:24 AM, Shai Almog <shai....@gmail.com> wrote:
I see an issue there, I'll fix it.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/hsEQahduXL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/groups/opt_out.

Shai Almog

unread,
Oct 23, 2013, 12:11:14 PM10/23/13
to codenameone...@googlegroups.com
This should be working now.

Eyal Muchtar

unread,
Oct 23, 2013, 12:13:52 PM10/23/13
to codenameone-discussions
Thanks for your quick reply.
I already tested it and it works great.


On Wed, Oct 23, 2013 at 7:11 PM, Shai Almog <shai....@gmail.com> wrote:
This should be working now.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/hsEQahduXL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/groups/opt_out.

Akintayo Olusegun

unread,
Oct 24, 2013, 9:22:22 AM10/24/13
to codenameone...@googlegroups.com
What I currently do is set request to fail silently and override all the error methods of the request. I also add an error listener to the network manager itself.


On Wednesday, October 23, 2013 9:11:01 AM UTC+2, Eyal Muchtar wrote:
Hi Shay,
I'm using Dialog that displayed by the following code:

        Dialog dlg = UiUtils.showDialog("Loading", "Data / Image Processing...", true);
        connRequest.setDisposeOnCompletion(dlg);
        networkManager.addToQueueAndWait(connRequest);
        resBytes = connRequest.getResponseData();

When getting timeout the dialog is still displayed and never disappeared.
On Wed, Oct 23, 2013 at 10:01 AM, Shai Almog <shai....@gmail.com> wrote:
Hi,
do you show a progress dialog which never goes away?
How do you show/dispose it?

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/hsEQahduXL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages