Skip to content

Commit efeb638

Browse files
authored
Merge pull request #558 from TomasVojacek/add_connection_error_to_log
log err.error() if ConnectRetry is enabled to assist in identifying the cause of failed connections.
2 parents d978c56 + b3a11bc commit efeb638

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func (c *client) Connect() Token {
282282
conn, rc, t.sessionPresent, err = c.attemptConnection()
283283
if err != nil {
284284
if c.options.ConnectRetry {
285-
DEBUG.Println(CLI, "Connect failed, sleeping for", int(c.options.ConnectRetryInterval.Seconds()), "seconds and will then retry")
285+
DEBUG.Println(CLI, "Connect failed, sleeping for", int(c.options.ConnectRetryInterval.Seconds()), "seconds and will then retry, error:", err.Error())
286286
time.Sleep(c.options.ConnectRetryInterval)
287287

288288
if atomic.LoadUint32(&c.status) == connecting {

0 commit comments

Comments
 (0)