Skip to content
Snippets Groups Projects
Commit 999b6739 authored by Samuel Jackson's avatar Samuel Jackson
Browse files

Remove pointer entirely and update comment

There is no longer a need to do this as the bug was present in Poco
<1.4. Since we now require a minimum of >=1.4 we can pass the socket
normally.
parent fd1f9c23
No related branches found
No related tags found
No related merge requests found
...@@ -164,8 +164,8 @@ std::string CatalogDownloadDataFiles::doDownloadandSavetoLocalDrive( ...@@ -164,8 +164,8 @@ std::string CatalogDownloadDataFiles::doDownloadandSavetoLocalDrive(
nullptr, certificateHandler, context); nullptr, certificateHandler, context);
// Session takes ownership of socket // Session takes ownership of socket
auto socket = Kernel::make_unique<Poco::Net::SecureStreamSocket>(context); Poco::Net::SecureStreamSocket socket{context};
Poco::Net::HTTPSClientSession session(*socket); Poco::Net::HTTPSClientSession session{socket};
session.setHost(uri.getHost()); session.setHost(uri.getHost());
session.setPort(uri.getPort()); session.setPort(uri.getPort());
...@@ -213,12 +213,6 @@ std::string CatalogDownloadDataFiles::doDownloadandSavetoLocalDrive( ...@@ -213,12 +213,6 @@ std::string CatalogDownloadDataFiles::doDownloadandSavetoLocalDrive(
// I have opted to catch the exception and do nothing as this allows the // I have opted to catch the exception and do nothing as this allows the
// load/download functionality to work. // load/download functionality to work.
// However, the port the user used to download the file will be left open. // However, the port the user used to download the file will be left open.
//
// In addition, there's a crash when destructing SecureSocketImpl (internal to
// SecureSocketStream, which is
// created and destroyed by HTTPSClientSession). We avoid that crash by
// instantiating SecureSocketStream
// ourselves and passing it to the HTTPSClientSession, which takes ownership.
catch (Poco::Exception &error) { catch (Poco::Exception &error) {
throw std::runtime_error(error.displayText()); throw std::runtime_error(error.displayText());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment