File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
olp-cpp-sdk-core/src/http/curl Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -558,11 +558,17 @@ void NetworkCurl::Deinitialize() {
558558 }
559559#endif
560560 thread_.join ();
561+
562+ #if (defined OLP_SDK_NETWORK_HAS_PIPE) || (defined OLP_SDK_NETWORK_HAS_PIPE2)
563+ close (pipe_[0 ]);
564+ close (pipe_[1 ]);
565+ #endif
561566 } else {
562567 // We are trying to stop the very thread we are in. This is not recommended,
563568 // but we try to handle it gracefully. This could happen by calling from one
564569 // of the static functions (rxFunction or headerFunction) that was passed to
565570 // the cURL as callbacks.
571+ assert (false );
566572 thread_.detach ();
567573 }
568574}
@@ -589,11 +595,6 @@ void NetworkCurl::Teardown() {
589595 // cURL teardown
590596 curl_multi_cleanup (curl_);
591597 curl_ = nullptr ;
592-
593- #if (defined OLP_SDK_NETWORK_HAS_PIPE) || (defined OLP_SDK_NETWORK_HAS_PIPE2)
594- close (pipe_[0 ]);
595- close (pipe_[1 ]);
596- #endif
597598 }
598599
599600 // Handle completed messages
You can’t perform that action at this time.
0 commit comments