Ok here is the scenario:
Fleet arrives to port to unload warehouse.
Warehouse has 0 resources in it so fleet has 0 cargo.
Fleet has 2 danger so its waiting for danger drop.
Warehouse is refilled with resources.
Danger drops, but fleet sails out with 0 resources.
Seems that the resources exchange is done when the fleet arrives.
If i refill the warehouse before danger drops it should sail out with the new added resources.