Hi Camillo, On 13 Jan 2013, at 18:19, Camillo Bruni <camillobruni@gmail.com> wrote:
I am trying to make the .sources downloads more stable and give proper feedback. I ran into the following problem with Zinc:
| client | (client := ZnClient new) numberOfRetries: 1; timeout: 5; ifFail: [ :e | "ignore" ] url: 'http://an.url.that.does.not.exists.ch/foo'; downloadTo: '.' asFileReference; close
Running this code hangs the image indefinitely (so far > 2min).
This is basically a DNS lookup problem, I thought that was under control: [ ZnClientTests run: #testIfFailNonExistingHost ] timeToRun. 2 See also ZnNetworkingUtils>>socketStreamToUrlDirectly:
Actually I would like to put #numberOfRetries to 0, since I want to fail as soon as possible during startup. However putting that the retry count to 0 yields an Exception caused by #downloadTo:
ZnClient(Object)>>error: "Request not yet executed" ZnClient>>isSuccess ZnClient>>downloadTo:
If I omit the #ifFail: block I get a warning about the wrong url, which is of course not what I want during startup?
Is this a Zinc bug?
I will test a bit more later on... Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill