[squeak-dev] The Inbox: WebClient-Core-cbc.118.mcz

Tobias Pape Das.Linux at gmx.de
Mon Oct 29 07:58:54 UTC 2018


> On 29.10.2018, at 01:55, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> 
> Hi Chris,
> 
> On Sun, 28 Oct 2018, Chris Cunningham wrote:
> 
>> Hi.
>> I was loading the VMMaker package(s), and after manually opening the debugger and restarting at #httpGet:do: about 10 times, I implemented this hack so that I didn't have to do that anymore.
>> I *think* this is fixing the issue - haven't had it raise errors while 'timing out' on loading packages since this (the timeout were sub-second - the connection hadn't gone through yet).  Still, it
>> might just be timing - this isn't really a repeatable bug.
> 
> I'm sure this change helps with that issue, but it has unwelcome side effects to WebClient's other users.
> The real solution would be to fix the server.

Concur!

> 
> Where did you see sub-second timeouts? The default timeout should be 45 seconds.
> 
>> Not in Trunk because it is definitely a hack - but it makes things work nicer.
>> Also, committing packages to the inbox with this loaded doesn't result in walkbacks (from timeouts and whatnot) for me.  Although it does take a long time to finish.
> 
> Uploads use PUT requests, so expect to still see walkbacks there.


Best regards
	-Tobias
> 
> Levente
> 
>> -cbc
>> On Sun, Oct 28, 2018 at 5:08 PM <commits at source.squeak.org> wrote:
>>      A new version of WebClient-Core was added to project The Inbox:
>>      http://source.squeak.org/inbox/WebClient-Core-cbc.118.mcz
>> 
>>      ==================== Summary ====================
>> 
>>      Name: WebClient-Core-cbc.118
>>      Author: cbc
>>      Time: 28 October 2018, 5:08:23.571079 pm
>>      UUID: 683fbe3b-418f-a443-9a20-3f2a7af4b7e1
>>      Ancestors: WebClient-Core-pre.117
>> 
>>      A hack to work around connectionTimedOut annoyances when opening packages from Trunk (sometimes).
>> 
>>      =============== Diff against WebClient-Core-pre.117 ===============
>> 
>>      Item was changed:
>>        ----- Method: WebClient>>httpGet:do: (in category 'methods') -----
>>        httpGet: urlString do: aBlock
>>              "GET the response from the given url"
>>              "(WebClient httpGet: 'http://www.squeak.org') content"
>> 
>>      +       | request errCount |
>>      -       | request |
>>              self initializeFromUrl: urlString.
>>              request := self requestWithUrl: urlString.
>>              request method: 'GET'.
>>              userAgent ifNotNil:[:ua | request headerAt: 'User-Agent' put: ua].
>>              self contentDecoders ifNotNil: [:decoders | request headerAt: 'Accept-Encoding' put: decoders].
>>      +
>>      +       errCount := 0. "Let's try resending to get around 'connection issues' trunk connections"
>>      +       [
>>      +               aBlock value: request.
>>      +               ^self sendRequest: request
>>      +       ] on: Error, NetworkError do: [:e| debugLog ifNotNil: [debugLog cr; nextPutAll: 'httpGet error: ', e; flush]. (errCount := errCount + 1) > 3 ifTrue: [e outer]. e retry].!
>>      -       aBlock value: request.
>>      -       ^self sendRequest: request
>>      - !
> 



More information about the Squeak-dev mailing list