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

Chris Cunningham cunningham.cb at gmail.com
Mon Oct 29 00:27:43 UTC 2018


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.

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.

-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
> - !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20181028/26588f99/attachment.html>


More information about the Squeak-dev mailing list