Fix for trying to receive a new file, when the previous file open failed with a permission denied

This commit is contained in:
Deon George 2022-02-06 20:21:35 +11:00
parent a05ca1c2a4
commit d1bfa3a035
2 changed files with 5 additions and 1 deletions

View File

@ -179,7 +179,7 @@ class Node
}
}
Log::debug(sprintf('%s:= auth [%d]',self::LOGKEY,$this->ftns_authed->count()));
Log::debug(sprintf('%s:= auth, we authed [%d] addresses',self::LOGKEY,$this->ftns_authed->count()));
return $this->ftns_authed->count();
}

View File

@ -835,6 +835,10 @@ final class Binkp extends BaseProtocol
Log::error(sprintf('%s: ! File Open ERROR [%s]',self::LOGKEY,$e->getMessage()));
$this->msgs(self::BPM_SKIP,$this->recv->name_size_time);
// Close the file, since we had an error opening it.
if ($this->recv->fd)
$this->recv->close();
}
return 1;