Skip to content

Discarded error from serversInfo.refresh() in proxy.go #3214

Description

@hklcf

Bug Description

In the periodic server refresh goroutine in proxy.go, the error from serversInfo.refresh() is silently discarded using the blank identifier. This error contains information about which servers failed and why.

Affected Code

proxy.go:331:

liveServers, _ = proxy.serversInfo.refresh(proxy)

Impact

Diagnostic information about server failures is lost. If all servers fail, liveServers will be 0, but the reason for the failure is not logged, making debugging difficult.

Fix

Log the error:

liveServers, err = proxy.serversInfo.refresh(proxy)
if err != nil {
    dlog.Warnf("Server refresh error: %v", err)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions