On 14 Jan 2013, at 22:07, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2013-01-14, at 22:05, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 14 Jan 2013, at 21:54, Camillo Bruni <camillobruni@gmail.com> wrote:
Issue with slice: http://code.google.com/p/pharo/issues/detail?id=7255
Yes, any DNS failure resulted in strange exception handling, IMO. This could indeed improve a couple more bogus situations.
thanks
The following should work after you load the slice:
ZnClient new timeout: 5; url: 'http://an.url.that.does.not.exists.ch/foo'; logToTranscript; downloadTo: FileSystem workingDirectory.
I just tried, seems like your slice improves your example, though I still get issues when changing the number of retries:
ZnClient new numberOfRetries: 1; "0 works..." timeout: 5; url: 'http://an.url.that.does.not.exists.ch/foo'; logToTranscript; downloadTo: FileSystem workingDirectory.
looks like it is still somewhere in the net resolver... strange
Well, I must admit that I don't really understand why/where it hangs ;-) I saw there was a problem with NameLookupFailure and I fixed what I thought was wrong.
Retry happens when something goes wrong, i.e. some exception is thrown. It shouldn't make any difference what actually happened.
But testing retry behaviour is hard, I will think about a way to do that in a unit test.
I can imagine :/, I will try to step through a bit further to get close to the problem.
With Camillo's fix for NetNameResolver's ResolverMutex retrying NameLookupFailires now seems to work. Sven