szaszm commented on a change in pull request #708: MINIFICPP-1118 - MiNiFi C++
on Windows stops running in a secure env …
URL: https://github.com/apache/nifi-minifi-cpp/pull/708#discussion_r366229841
##########
File path: libminifi/src/io/tls/TLSSocket.cpp
##########
@@ -200,17 +208,12 @@ int16_t TLSSocket::initialize(bool blocking) {
logger_->log_trace("want read");
return 0;
} else {
+ logger_->log_error("SSL socket connect failed to %s %d",
requested_hostname_, port_);
+ SSL_free(ssl_);
+ ssl_ = NULL;
+ Socket::closeStream();
Review comment:
These lines for cleanup are present in multiple places in the file. Did you
consider extracting to a function or utilizing RAII for cleanup?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services