When originating a session, send anything received via the queue

This commit is contained in:
2023-11-22 21:04:58 +11:00
parent 7847728e52
commit e5de4970d1
6 changed files with 27 additions and 17 deletions

View File

@@ -897,7 +897,7 @@ final class Binkp extends BaseProtocol
return TRUE;
}
$this->recv->new($file['file'],$this->node->address);
$this->recv->new($file['file'],$this->node->address,$this->force_queue);
try {
switch ($this->recv->open($file['offs']<0,$file['flags'])) {
@@ -1341,14 +1341,16 @@ final class Binkp extends BaseProtocol
/**
* Set up our BINKP session
*
* @param bool $force_queue
* @return int
* @throws \Exception
*/
protected function protocol_session(): int
protected function protocol_session(bool $force_queue=FALSE): int
{
if ($this->binkp_init() !== self::OK)
return self::S_FAILURE;
$this->force_queue = $force_queue;
$this->binkp_hs();
while (TRUE) {