error properly when lbcd fails to connect in HTTP POST mode #99

Merged
lyoshenka merged 1 commit from connection-failure into master 2022-10-14 20:40:46 +02:00

1 commit

Author SHA1 Message Date
Alex Grintsvayg
455fb20dab
error properly when lbcd fails to connect in HTTP POST mode
in the case where you're e.g. trying to connect to an
invalid address, the err vars in handleSendPostMessage()
were being shadowed inside the for loop. if c.httpClient.Do()
returned an error, that error never got returned upstream.
then ioutil.ReadAll(httpResponse.Body) would get a nil pointer
dereference. this fixes that case.
2022-10-14 13:38:27 -04:00