szaszm commented on a change in pull request #740: MINIFICPP-1144 - Fix 
HTTPCallback freeze and refactor class
URL: https://github.com/apache/nifi-minifi-cpp/pull/740#discussion_r380726258
 
 

 ##########
 File path: libminifi/include/utils/HTTPClient.h
 ##########
 @@ -201,15 +209,18 @@ class HTTPRequestResponse {
    */
 
   static size_t send_write(char * data, size_t size, size_t nmemb, void * p) {
-    if (p != 0) {
-      HTTPUploadCallback *callback = (HTTPUploadCallback*) p;
-      if (callback->stop)
+    try {
 
 Review comment:
   I think this is one of the rare use cases for a function-try-block. It's 
minor and a stylistic question, so feel free to close, but IMO it would 
communicate the intent ("wrap this whole thing in `try`") better.

----------------------------------------------------------------
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

Reply via email to