Skip to content

Commit

Permalink
fix: bug of failure of document component (#152)
Browse files Browse the repository at this point in the history
Because

- the stdin in a thread is not closed, so the pipeline stuck.

This commit

- fix the sequence of close of stdin
  • Loading branch information
chuang8511 authored Jun 5, 2024
1 parent c43831c commit aed51f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operator/document/v0/convert_pdf_to_markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ func convertPDFToMarkdown(input convertPDFToMarkdownInput, cmdRunner commandRunn
if err != nil {
return convertPDFToMarkdownOutput{}, err
}
defer stdin.Close()
errChan := make(chan error, 1)

go func() {
defer stdin.Close()
_, err := stdin.Write(b)
if err != nil {
errChan <- err
Expand Down

0 comments on commit aed51f8

Please sign in to comment.