InventoryManager: fixed windows not opening when the server removes windows

closes #5094
This commit is contained in:
Dylan K. Taylor 2022-06-05 16:02:26 +01:00
parent e12e4e8fb8
commit e040c2b281
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -269,11 +269,13 @@ class InventoryManager{
//initiated the close and expect an ack.
$this->session->sendDataPacket(ContainerClosePacket::create($id, false));
if($this->pendingOpenWindowCallback !== null && $id === $this->pendingCloseWindowId){
$this->session->getLogger()->debug("Opening deferred window after close ack of window $id");
if($this->pendingCloseWindowId === $id){
$this->pendingCloseWindowId = null;
($this->pendingOpenWindowCallback)();
$this->pendingOpenWindowCallback = null;
if($this->pendingOpenWindowCallback !== null){
$this->session->getLogger()->debug("Opening deferred window after close ack of window $id");
($this->pendingOpenWindowCallback)();
$this->pendingOpenWindowCallback = null;
}
}
}