Hi Thomas,
thanks for the patch, I just integrated it.

Best regards,
Michael

Am 05.07.2014 00:33, schrieb Thomas Lockhart:
> On 7/4/14 7:33 AM, Jakob Erdmann wrote:
>> since I haven't encountered the error on my machine, it would be most
>> helpful if you could attempt a fix on your end, and then send me a
>> patch (or just the updated file if that's easier).
> Here you go. I've run into this before. There were (I think) a few
> issues in the traci __init__.py file (only a couple of significant ones):
> 
> 1) That python socket is not reusable once an error occurs. So I moved
> it into the retry loop and make a new one each time.
> 
> 2) Options need to be set before the socket is connected. I reordered this.
> 
> 3) After the first failure the connection is retried immediately since
> "wait" is zero. I've made the first wait be one second.
> 
> 4) The parameter "numRetries" implies "number of retries", not "total
> number of tries". I've adjusted the loop behavior to match the parameter
> name.
> 
> We may want to change the code to wait one second between retries; atm
> it waits an increasing amount of time which may also be increasingly
> annoying.
> 
> There may be other things to do with socket settings and I'll stay in
> touch if I run into anything when we do more with the TraCI interface.
> But afaik these are good basic settings (and the same as what were
> there; I did not add anything).
> 
> Thanks for some great code!
> 
>                                  - Tom
> 
>>
>>
>> 2014-07-04 16:24 GMT+02:00 Thomas Lockhart
>> <[email protected] <mailto:[email protected]>>:
>>
>>     On 7/4/14 7:21 AM, Jakob Erdmann wrote:
>>>     I would be happy about your contribution.
>>>     It looks as if the code in traci/__init__.py:382 already attempts
>>>     to solve the timeout problem but somehow is not working.
>>     Yes. I'm looking at some code I have from another task and it
>>     looks like the options need to be set before the socket is opened.
>>     And there are some more options which could be used.
>>
>>     Would you like me to send some code snippets as examples or would
>>     you like me to actually try something?
>>
>>                                         - Tom
>>
>>
>>>
>>>     best regards,
>>>     Jakob
>>>
>>>
>>>     2014-07-04 16:11 GMT+02:00 Thomas Lockhart
>>>     <[email protected]
>>> <mailto:[email protected]>>:
>>>
>>>         On 7/4/14 7:07 AM, Jakob Erdmann wrote:
>>>>         Hello,
>>>>         we are aware of the issue and will try to implement a
>>>>         general solution (see
>>>>         http://sumo-sim.org/trac.wsgi/ticket/1371) until then adding
>>>>         a sleep() command is the recommended fix.
>>>         Hi Jakob. Do you have someone already assigned to work on it?
>>>         Or would you find a contribution helpful?
>>>
>>>                                      - Tom
>>>
>>>
>>>>         regards,
>>>>         Jakob
>>>>
>>>>
>>>>         2014-07-04 15:31 GMT+02:00 Thomas Lockhart
>>>>         <[email protected]
>>>>         <mailto:[email protected]>>:
>>>>
>>>>             On 7/3/14 11:05 PM, Sidharth S wrote:
>>>>>             Great, this works. But does anyone know why  this error
>>>>>             is happening? Why isn't the server getting connected?
>>>>>
>>>>             My guess is that SUMO has not yet fully started so traci
>>>>             does not find the port. But also does not fail and
>>>>             retry. Will look at it...
>>>>
>>>>             - Tom
>>>>
>>>>
>>>
>>>
>>
>>
> 
> 


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to