Skip to content

Commit

Permalink
fix(server): trigger try reconnect on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpals committed Mar 21, 2024
1 parent 0688e8c commit 1801c54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/daemon/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ func (c *Client) Connect() error {
conn, err := net.Dial("tcp", c.addr)
if err != nil {
if err, ok := err.(*net.OpError); ok {
if strings.HasSuffix(err.Err.Error(), "connection refused") {
msg := err.Err.Error()
if strings.HasSuffix(msg, "connection refused") || strings.HasSuffix(msg, "No connection could be made because the target machine actively refused it.") {
return c.tryReconnect(err)
}
}
Expand Down

0 comments on commit 1801c54

Please sign in to comment.