Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Reconnect button #9

Open
choroba opened this issue Jul 12, 2017 · 6 comments
Open

Add Reconnect button #9

choroba opened this issue Jul 12, 2017 · 6 comments

Comments

@choroba
Copy link
Owner

choroba commented Jul 12, 2017

No description provided.

@choroba
Copy link
Owner Author

choroba commented Sep 18, 2017

Sometimes, the communication thread dies - e.g. when the network disconnects, or when invalid unicode characters appear in the output (why?). Make it possible to start a new thread instead, maybe even restart it automatically after it dies.

@LorenzoTa
Copy link
Contributor

hi choroba,

with my limited understanding there is no need to 'reconnect': the logged in state remains true even after parse errors. During the usage of the previous version (but considerations seem to me still valid) I collected various failures. You proposed a try::tiny blocks around connection/parsing iirc.

Here errors I received in the past (note that i always use MCE but i think this is unrelated):

1) connection errors:

Hobo -4644 terminated abnormally: reason Error GETing http://www.perlmonks.org/bare/?node_id=15848&prior_to=542568456: C
an't connect to www.perlmonks.org:80 (timeout) at pmchatTk06.pl line 167

and

Hobo -4780 terminated abnormally: reason Error GETinghttp://www.perlmonks.org/bare/?node_id=15848: Status read failed:
Connessione in corso interrotta forzatamente dall'host remoto. at pmchatTk06.pl line 167

2) parser and decode errors:

Hobo -1340 terminated abnormally: reason :4: parser error : Extra content at the end of the document
</chatter><span class="error" style="color: #cc0000">Server Error (Error ID 7916
          ^

and

XS_Tk__Callback_Call error:Cannot decode string with wide characters at C:/ulisse/strawberry/perl/lib/Encode.pm line 176
, <$__ANONIO__> line 82931.

Tk::Error: Cannot decode string with wide characters at C:/ulisse/strawberry/perl/lib/Encode.pm line 176, <$__ANONIO__>
line 82931.
 Tk::After::repeat at C:/ulisse/strawberry/perl/site/lib/Tk/After.pm line 80
 [repeat,[{},after#72532,1000,repeat,[\&main::__ANON__]]]
 ("after" script)

and

UCS-2LE:code point "\x{1f3b5}" too high at C:/ulisse/strawberry/perl/site/lib/Tk.pm line 251, <$__ANONIO__> line 10549.
UCS-2LE:code point "\x{1f3b5}" too high at C:/ulisse/strawberry/perl/site/lib/Tk.pm line 251, <$__ANONIO__> line 10549.
UCS-2LE:code point "\x{1f3b5}" too high at C:/ulisse/strawberry/perl/site/lib/Tk.pm line 251, <$__ANONIO__> line 10549.
UCS-2LE:code point "\x{1f3b5}" too high at C:/ulisse/strawberry/perl/site/lib/Tk.pm line 424, <$__ANONIO__> line 10551.
Unable to free colormap, palette is still selected.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

and

Hobo -3548 terminated abnormally: reason :2: parser error : Extra content at the end of the document
<p>An error has occured.  The site administrators have been notified.  We thank
^


If I can help I'll be glad to contribute: maybe for the try::tiny stuffs as my unicode-fu is limited
thanks
L*

@choroba
Copy link
Owner Author

choroba commented Sep 19, 2017

@LorenzoTa Thanks for the collection. Is a Hobo thread restarted automatically when it terminates? Perl threads aren't, so I need to start a new thread in the mentioned situation.

@LorenzoTa
Copy link
Contributor

I dont think Hobo restarts automatically. but there is marioroy for details

@choroba
Copy link
Owner Author

choroba commented Sep 28, 2017

Automatic restart of the worker thread was implemented in 61b89a0.

@choroba
Copy link
Owner Author

choroba commented Oct 7, 2017

After recent fixes, the restart should be less frequent. The correct solution would be to create two threads, one for GUI and one for LWP, and have the main thread restart the LWP worker when it dies.

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

No branches or pull requests

2 participants