On 2013-01-13, at 19:19, Sven Van Caekenberghe <sven@stfx.eu> wrote:
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
this test passes here, so the basic features are ok. But I think there is a strange interaction between the lookup/timeout and #downloadTo / streaming..
See also ZnNetworkingUtils>>socketStreamToUrlDirectly:
I will take a look at that tomorrow, thanks.