Sorry for that duplicate bug. Missed out that lfaraone already filed the bug.<br><br>I have attached the revised patch. (uploaded at bugs.sl.o too)<br>* changed things (subject, description, etc) according to Sascha Silbe's suggestions.<br>
<br>@ Marco : The default timeout is way too long (unable to find out exact time). Yes, the process is synchronous, thats why Sugar is freezing.<br><br>@ Tomeu: Thanks for the review. Will try to get the registration process asynchronous.<br>
<br>Regards,<br>Dipankar<br><br><div class="gmail_quote">On Mon, Sep 6, 2010 at 4:12 PM, Tomeu Vizoso <span dir="ltr"><<a href="mailto:tomeu@sugarlabs.org">tomeu@sugarlabs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Mon, Sep 6, 2010 at 11:51, Marco Pesenti Gritti <<a href="mailto:marco@marcopg.org">marco@marcopg.org</a>> wrote:<br>
> On Sun, Sep 5, 2010 at 3:44 PM, Dipankar Patro <<a href="mailto:dipankar@seeta.in">dipankar@seeta.in</a>> wrote:<br>
>> Hi,<br>
>><br>
>> In reference to ticket #2290 (<a href="http://bugs.sugarlabs.org/ticket/2290" target="_blank">http://bugs.sugarlabs.org/ticket/2290</a>)<br>
>><br>
>> I have uploaded a patch (have attached it too).<br>
>><br>
>> Problem: in the register procedure the time out of connection was not<br>
>> implemented, for an unavailable server.<br>
>><br>
>> Solution in Patch:<br>
>> - Have implemented a TimedOut connection (TimedOutServerProxy( ) function)<br>
>> which encounters the problem of unavailable servers.<br>
>> - The connection timeout can be changed in seconds through the variable :<br>
>> 'timeout'.<br>
>> The default setting is at : timeout=socket._GLOBAL_DEFAULT_TIMEOUT<br>
>> Change it to : timeout=10, to find Sugar does not freeze anymore.<br>
><br>
> How long is the default timeout? Are we freezing because we are doing<br>
> the xmlrpc requests synchronously?<br>
<br>
</div></div>Previous discussion is actually in<br>
<a href="http://bugs.sugarlabs.org/ticket/2289" target="_blank">http://bugs.sugarlabs.org/ticket/2289</a> and not in #2290.<br>
<br>
Looks like we cannot do XML-RPC with GIO because it doesn't support<br>
POST for http requests.<br>
<br>
The right component in our stack would be libsoup but we find again<br>
that we need introspection to use it because nobody cared to write,<br>
maintain and package python bindings for it.<br>
<br>
This makes xmlrpclib usage async, but it also uses private API:<br>
<br>
<a href="http://www.mail-archive.com/pygtk@daa.com.au/msg12971.html" target="_blank">http://www.mail-archive.com/pygtk@daa.com.au/msg12971.html</a><br>
<br>
So maybe the best we can do for now is indeed setting a timeout.<br>
<br>
Regards,<br>
<br>
Tomeu<br>
<br>
> Marco<br>
<div><div></div><div class="h5">> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
><br>
</div></div></blockquote></div><br>