nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #713: MINIFICPP-1119 unify win/posix sockets + clean up issues
Date Mon, 03 Feb 2020 16:10:24 GMT
arpadboda commented on a change in pull request #713: MINIFICPP-1119 unify win/posix sockets
+ clean up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#discussion_r374142976
 
 

 ##########
 File path: libminifi/src/io/StreamFactory.cpp
 ##########
 @@ -76,9 +77,8 @@ class SocketCreator : public AbstractStreamFactory {
   std::unique_ptr<Socket> createSecureSocket(const std::string &host, const uint16_t
port, const std::shared_ptr<minifi::controllers::SSLContextService> &ssl_service)
{
 #ifdef OPENSSL_SUPPORT
     if (ssl_service != nullptr) {
-      auto ptr = std::make_shared<TLSContext>(configuration_, ssl_service);
-      TLSSocket *socket = new TLSSocket(ptr, host, port);
-      return std::unique_ptr<Socket>(socket);
+      auto context = std::make_shared<TLSContext>(configuration_, ssl_service);
+      return utils::make_unique<TLSSocket>(context, host, port);
     } else {
 
 Review comment:
   Nitpicking: no need for the else branch here

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message