OK, if I understand you correctly, the outer for loop is not needed and that
there should be two for loops.
the first for loop does step 1,2 and 3 and then "break" out of the loop
when valid response is received
and then set the "interval".
The second for loop start a for _ := range ticker.C loop
Hi Brian,
Thanks for the reply. I intentionally left the error checks out so as to
make the code short.
Also using the Client.Do was an error and its suppose to be
transport.Client.Do.
Also in the main() does other stuff after the PUT and PATCH messages but
does not have any function that is
Any updates, I am also facing this issue in my case Golang server just
stuck and openFD gets spiked.
-Rahul
On Thursday, August 27, 2020 at 8:40:19 PM UTC+5:30 Siddhesh Divekar wrote:
> Ok, so your data collectors never complete. A simple change to make this
>> easier to diagnose is to not
Il giorno venerdì 19 marzo 2021 alle 23:20:49 UTC+1 Tim Hockin ha scritto:
> Thanks for feedback, comments below
>
> On Thu, Mar 18, 2021 at 3:35 PM Jay Conrod wrote:
>
>>
>> > [...]
>
>
>> *2. "writing go.mod cache" error messages*
>>
>> This error message should be a lot better. Sorry
On Saturday, 20 March 2021 at 10:04:33 UTC Brian Candler wrote:
> 2. In HandlePUTMessage you are ignoring the HTTP status code
>
My mistake, ignore that one. You are handling it in the caller,
SendPUTMessageToServerB.
--
You received this message because you are subscribed to the Google
One other minor point. When you write
for _ = range ticker.C {
...
}
then you have a timer leak if you break or return from that loop but don't
call ticker.Stop(). If you only ever exit by "return" from the function,
then you can simply do:
ticker :=
*> Any help and comments about my application design*
A few general observations first:
1. In several places you are ignoring the error status, in particular at
json.Unmarshal(bodybytes, ) and the error from transport.Client.Do
2. In HandlePUTMessage you are ignoring the HTTP status code
3. I
Hi,
I have been learning Golang for some few months now but still find it
difficult to design some applications. I have two HTTP servers A and B and
would like to do the following
1. server A send an HTTP PUT request with JSON body to server B.
2. If server B is not available, server A retry