reduce complexity

This commit is contained in:
Zack Scholl 2019-09-20 10:00:52 -07:00
parent a7435a08bd
commit 8be63bed43
1 changed files with 62 additions and 60 deletions

View File

@ -799,7 +799,10 @@ func (c *Client) recipientGetFileReady(finished bool) (err error) {
}
func (c *Client) updateIfRecipientHasFileInfo() (err error) {
if !c.Options.IsSender && c.Step2FileInfoTransfered && !c.Step3RecipientRequestFile {
if !(!c.Options.IsSender && c.Step2FileInfoTransfered && !c.Step3RecipientRequestFile) {
return
}
// find the next file to transfer and send that number
// if the files are the same size, then look for missing chunks
finished := true
@ -865,7 +868,6 @@ func (c *Client) updateIfRecipientHasFileInfo() (err error) {
// TODO: print out something about this file already existing
}
err = c.recipientGetFileReady(finished)
}
return
}