arpadboda commented on a change in pull request #869:
URL: https://github.com/apache/nifi-minifi-cpp/pull/869#discussion_r469147779



##########
File path: libminifi/src/io/FileStream.cpp
##########
@@ -101,13 +96,12 @@ int FileStream::writeData(std::vector<uint8_t> &buf, int 
buflen) {
 
 int FileStream::writeData(uint8_t *value, int size) {
   if (!IsNullOrEmpty(value)) {
-    std::lock_guard<std::recursive_mutex> lock(file_lock_);
+    std::lock_guard<std::mutex> lock(file_lock_);
     if (file_stream_->write(reinterpret_cast<const char*>(value), size)) {
       offset_ += size;
       if (offset_ > length_) {
         length_ = offset_;
       }
-      file_stream_->seekg(offset_);

Review comment:
       Hope I don't miss anything here due to lack of coffee, but it seems to 
be that there is no real point in seeking to where we just finished writing. 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to