Failed to connect error for unix socket

This commit is contained in:
2025-07-05 00:01:33 -05:00
parent 4e516b5840
commit 447cba3790
2 changed files with 4 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ namespace Tesses::Framework::Http
{
auto netStrm = new NetworkStream(uri.host,uri.GetPort(),false,false,false);
if(netStrm == nullptr) return nullptr;
return new ClientTLSStream(netStrm, true, ignoreSSLErrors,uri.host, trusted_root_cert_bundle);
return new ClientTLSStream(netStrm, true, !ignoreSSLErrors,uri.host, trusted_root_cert_bundle);
}
return nullptr;
@@ -142,7 +142,7 @@ namespace Tesses::Framework::Http
{
auto netStrm = new NetworkStream(unixPath,false);
if(netStrm == nullptr) return nullptr;
return new ClientTLSStream(netStrm, true, ignoreSSLErrors,uri.host, trusted_root_cert_bundle);
return new ClientTLSStream(netStrm, true, !ignoreSSLErrors,uri.host, trusted_root_cert_bundle);
}
return nullptr;

View File

@@ -300,7 +300,7 @@ namespace Tesses::Framework::Streams {
unlink(unixPath.c_str());
if(NETWORK_BIND(this->sock, (const sockaddr*)&unx, (socklen_t)sizeof(unx)) != 0)
{
std::cout << "FAILED TO BIND: " << strerror(errno) << std::endl;
std::cerr << "FAILED TO BIND: " << strerror(errno) << std::endl;
this->success = false;
return;
}
@@ -309,6 +309,7 @@ namespace Tesses::Framework::Streams {
{
if(NETWORK_CONNECT(this->sock,(const sockaddr*)&unx, (socklen_t)sizeof(unx)) != 0)
{
std::cerr << "FAILED TO CONNECT: " << strerror(errno) << std::endl;
this->success=false;
return;
}