rcolebaugh / rpms / openssh

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