After successfully connecting to the ICAP server, the code sets connection->flags to CI_CONNECTION_CONNECTED. The code uses &= instead of |=, however, so the flags do not get set successfully. This is for both the TLS and non-TLS code.
Here is a patch that fixes this issue:
index 1d03124..c8e9934 100644
--- a/net_io.c
+++ b/net_io.c
@@ -289,7 +289,7 @@ int ci_connect_to_nonblock(ci_connection_t connection, const char servername,
ci_strerror(errno, errBuf, sizeof(errBuf)));
return -1;
}
connection->flags |= CI_CONNECTION_CONNECTED;
}
return 1;
index f888dd5..5dac859 100644
--- a/openssl/net_io_ssl.c
+++ b/openssl/net_io_ssl.c
@@ -811,7 +811,7 @@ int ci_tls_connect_nonblock(ci_connection_t connection, const char servername,
ci_strerror(errno, buf, sizeof(buf)));
return -1;
}
connection->flags &= CI_CONNECTION_CONNECTED;
connection->flags |= CI_CONNECTION_CONNECTED;
return 1;
}
Anonymous
The milestone should be set to 0.5.x, not modules-0.5x.
Fixed in master branch with git commit 77ab787