Closed rinigus closed 7 years ago
I was rather busy so sorry for not replying to this sooner. :)
I plan to take a look during the weekend.
My main worry is unconditionally removing the timeout globally - I'll have to look at the code in more detail if this really could happen - but I'd like to prevent:
But as I say above - I have to investigate - it might not be that bad and using None might just use some default timeout (30 seconds ?) so these scenarios would not really happen.
Yes, it does need some investigation. I think that in Poor Maps there is a difference whether connection is to localhost (aka OSM Scout Server) or to the outside servers. For localhost, we maybe could drop timeouts. I don't know how its implemented in modRana, but maybe it does have difference on whether it can establish connection and waits for reply or whether the receiving end is not available (server is closed).
In addition, I don't know whether 30 seconds is sufficient. There maybe rather complex cases for the rendering and slow phones.
So looking at the code in more detail (I really should simplify this eventually, it much too convoluted) - it looks like it should be easy to set a per layer timeout, because there are separate per-layer connection pools to facilitate connection reuse.
So it should be possible to set a longer timeout for the pools for the OSM Scout Server layers separately from the other pools, solving the issue.
I'll try to implement this later today. :)
Sounds great!
Looks like this PR should fix the issue: https://github.com/M4rtinK/modrana/pull/204 Testing & feedback welcome! :)
Closing PR since a better implementation is available
Morning! Ping regarding this pull request - would be great to get your opinion on it. As it is, modRana - OSM Scout Server interaction could be disturbed due to the timeouts.