Skip to content

Commit

Permalink
Merge pull request #2048 from duguhaotian/master
Browse files Browse the repository at this point in the history
[monitor] wrong statement of break
  • Loading branch information
Christian Brauner committed Dec 19, 2017
2 parents 0720664 + 94bc08e commit 90f20db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/monitor.c
Expand Up @@ -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);
Expand Down

0 comments on commit 90f20db

Please sign in to comment.