[Gambas-user] Connect hang with latest revision

Caveat Gambas at ...1950...
Mon Jun 3 09:39:08 CEST 2013


Strangely enough, I had a similar problem with sockets in python.  
Turned out that the problem was caused by setting the timeout value on a 
socket, *then* setting the blocking mode.  It seems as if the underlying 
socket 'loses' the timeout value (I actually discovered it when creating 
a help function that showed the state of the socket) when you set the 
blocking mode.

I was seeing the same symptoms as you, I had the timeout set (or so I 
thought!) to 10 seconds and the socket would take more than 2 minutes to 
time out...

I presume under Gambas you have the same possibility to set 'blocking' 
sockets (synchronous) and 'non-blocking' (asynchronous) sockets and to 
set a user-defined timeout value.

Please do try first setting the socket to blocking (synchronous) mode, 
THEN setting the timeout value!

Kind regards,
Caveat

On 02/06/13 17:05, Ron wrote:
> Bug #1 and Bug #2 are fixed, thanks for that!
>
> The time it takes for Event_Error to trigger is still more than 2 minutes.
> I see that in ClientSocket there is a 10sec timer running which cuts
> the socket if still not connected.
>
> Is this the way it should be implemented, what about the TimeOut
> property it seems it doesn't work?
> Would be nice if users know after 10 secs that the socket is unable to
> connect, +2 minutes is too long...
>
> Regards,
> Ron.
>
> 2013/6/1 Benoît Minisini <gambas at ...1...>:
>> Le 01/06/2013 10:33, Ron a écrit :
>>> Benoit,
>>>
>>> It seems to be a Gambas3 thing all along... not latest revisions...
>>> but I didn't see this until I specified a wrong IP address to connect
>>> too in my project.
>>> Also on the Raspberry Pi I saw this earlier, thinking... man that's a
>>> slow device, now I know Gambas socket blocks everything when a host
>>> cannot be reached..
>>>
>>> I detected three bugs... and filled this bug report.
>>> https://code.google.com/p/gambas/issues/detail?id=435
>>>
>>> Regards,
>>> Ron_2nd.
>>>
>> OK. It seems to be an old bad change. I fixed it in revision #5689.
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>> ------------------------------------------------------------------------------
>> Get 100% visibility into Java/.NET code with AppDynamics Lite
>> It's a free troubleshooting tool designed for production
>> Get down to code-level detail for bottlenecks, with <2% overhead.
>> Download for free and get started troubleshooting in minutes.
>> http://p.sf.net/sfu/appdyn_d2d_ap2
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>





More information about the User mailing list