Skip to content

can you add connect fail Handler,reconnect fail Handler ? thanks #579

Open
@wthsjy

Description

@wthsjy

like this:

	if c.options.ConnectRetry {
                         if c.options.ConnectFail != nil {
				go c.options.ConnectFail( err)
			}

				DEBUG.Println(CLI, "Connect Failed, Sleeping for", int(c.options.ConnectRetryInterval.Seconds()), "seconds and will then retry, error:", err.Error())
				time.Sleep(c.options.ConnectRetryInterval)

				if atomic.LoadUint32(&c.status) == connecting {
					goto RETRYCONN
				}
			}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions