kentpeacock / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
f09e2e
diff -up openssh-5.8p2/mux.c.remove_stale openssh-5.8p2/mux.c
f09e2e
--- openssh-5.8p2/mux.c.remove_stale	2011-01-14 02:01:32.000000000 +0100
f09e2e
+++ openssh-5.8p2/mux.c	2011-06-09 15:27:42.556360291 +0200
f09e2e
@@ -1867,6 +1867,9 @@ muxclient(const char *path)
f09e2e
 			unlink(path);
f09e2e
 		} else if (errno == ENOENT) {
f09e2e
 			debug("Control socket \"%.100s\" does not exist", path);
f09e2e
+		} else if (errno == ECONNREFUSED) {
f09e2e
+			debug("Removing stale control socket \"%.100s\"", path);
f09e2e
+			unlink(path);
f09e2e
 		} else {
f09e2e
 			error("Control socket connect(%.100s): %s", path,
f09e2e
 			    strerror(errno));