validate connection step

This commit is contained in:
yggverse 2024-08-28 20:26:23 +03:00
parent c4086d866f
commit 9a0e9d3f17

View file

@ -131,11 +131,24 @@ void Page::update()
), .25
);
try
{
GioSocketConnection_RefPtr = GioSocketClient_RefPtr->connect_to_uri_finish(
result
);
}
// Request
catch (const Glib::Error & EXCEPTION)
{
set(
pageNavbar->get_request_host(),
EXCEPTION.what(), 1
);
}
// Connection established, begin request
if (GioSocketConnection_RefPtr != nullptr)
{
const Glib::ustring request = pageNavbar->get_request_text() + "\r\n";
GioSocketConnection_RefPtr->get_output_stream()->write_async(
@ -212,6 +225,7 @@ void Page::update()
}
);
}
}
);
}