diff options
author | NeilBrown <neilb@suse.de> | 2008-07-18 16:37:28 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-07-18 16:37:28 +1000 |
commit | eb2c876f4deef9da9eda6359647e2f6ad2083957 (patch) | |
tree | 9379646d1f0fe2b9328fb52d1e1676ebf28b41b3 | |
parent | 33af8567de2f7b353abb53a0f6e9cffdc136a622 (diff) | |
download | mdadm-eb2c876f4deef9da9eda6359647e2f6ad2083957.tar.gz |
msg: add a timeout to ping_monitor
Though it should never bee needed, having a timeout in ping_monitor is
a sensible safeguard.
Signed-off-by: Neil Brown <neilb@suse.de>
-rw-r--r-- | msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -173,11 +173,11 @@ int ping_monitor(char *devname) return sfd; /* try to ping existing socket */ - if (ack(sfd, 0) != 0) + if (ack(sfd, 20) != 0) err = -1; /* check the reply */ - if (!err && wait_reply(sfd, 0) != 0) + if (!err && wait_reply(sfd, 20) != 0) err = -1; close(sfd); |