MINOR: connection: don't remove failed handshake flags
It's annoying that handshake handlers remove themselves from the
connection flags when they fail because there is no way to tell
which one fails. So now we only remove them when they succeed.
diff --git a/src/connection.c b/src/connection.c
index d882bb7..a527bd7 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -428,7 +428,6 @@
fail:
conn_sock_stop_both(conn);
conn->flags |= CO_FL_ERROR;
- conn->flags &= ~flag;
return 0;
}
@@ -574,7 +573,6 @@
out_error:
/* Write error on the file descriptor */
conn->flags |= CO_FL_ERROR;
- conn->flags &= ~flag;
return 0;
out_wait:
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 2892f8f..be324c0 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -980,7 +980,6 @@
/* Fail on all other handshake errors */
conn->flags |= CO_FL_ERROR;
- conn->flags &= ~flag;
return 0;
}
diff --git a/src/stream_interface.c b/src/stream_interface.c
index e70f0f5..dc14858 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -485,7 +485,6 @@
out_error:
/* Write error on the file descriptor */
conn->flags |= CO_FL_ERROR;
- conn->flags &= ~flag;
return 0;
out_wait: