vishalmishra434 / rpms / openssh

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