Skip to content

Commit

Permalink
fix for issue 237
Browse files Browse the repository at this point in the history
  • Loading branch information
rv355 committed Oct 28, 2024
1 parent de38f03 commit 2905930
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions remote_function/udf_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def image_api():
return_string += r_meta.encode("utf-8")

os.remove(tmpfile)
if return_string == "" or return_string == None:
return "error"
return return_string


Expand Down
6 changes: 5 additions & 1 deletion src/ImageLoop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,15 @@ void ImageLoop::execute_remote_operations(
continue;
}
cv::Mat dmat = write_image(responseBuffer[rindex]);
if (dmat.rows == 0 || dmat.cols == 0){
throw VCLException(ObjectEmpty,
"Invalid response from the remote server.");
}
if (dmat.empty()) {
pendingImages.push_back(img);
}

img->shallow_copy_cv(dmat);
img->shallow_copy_cv(dmat);
img->update_op_completed();

auto const result = imageMap.insert(
Expand Down

0 comments on commit 2905930

Please sign in to comment.