Skip to content

Commit

Permalink
Fix EOM for SendFile
Browse files Browse the repository at this point in the history
To terminate a connection of varlink, say after sending a file, we need to send a message containing a delimiter of ':' so the client knows to hang up.

Fixes: containers#6237

Signed-off-by: Brent Baude <bbaude@redhat.com>
  • Loading branch information
baude committed May 18, 2020
1 parent d4587c6 commit 6f224d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/varlinkapi/transfers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (i *VarlinkAPI) SendFile(call iopodman.VarlinkCall, ftype string, length in

logrus.Debugf("successfully received %s", outputFile.Name())
// Send an ACK to the client
call.Call.Writer.WriteString(outputFile.Name())
call.Call.Writer.WriteString(outputFile.Name() + ":")
call.Call.Writer.Flush()
return nil

Expand Down

0 comments on commit 6f224d0

Please sign in to comment.