Unverified Commit 90f20db1 by Christian Brauner Committed by GitHub

Merge pull request #2048 from duguhaotian/master

[monitor] wrong statement of break
parents 0720664d 94bc08e9
......@@ -232,7 +232,7 @@ int lxc_monitor_open(const char *lxcpath)
for (retry = 0; retry < sizeof(backoff_ms) / sizeof(backoff_ms[0]); retry++) {
fd = lxc_abstract_unix_connect(addr.sun_path);
if (fd < 0 || errno != ECONNREFUSED)
if (fd != -1 || errno != ECONNREFUSED)
break;
ERROR("Failed to connect to monitor socket. Retrying in %d ms: %s", backoff_ms[retry], strerror(errno));
usleep(backoff_ms[retry] * 1000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment