Skip to content

Commit

Permalink
Call cache store callback before lookup callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveRandom committed Jun 16, 2014
1 parent 8e82108 commit 6174dfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Addr/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ private function onSocketReadable()
}

if ($addr !== null) {
foreach ($request['lookups'] as $id => $lookup) {
$this->completePendingLookup($id, $addr, $type);
}

if ($request['cache_store']) {
call_user_func($request['cache_store'], $name, $addr, $type, $ttl);
}

foreach ($request['lookups'] as $id => $lookup) {
$this->completePendingLookup($id, $addr, $type);
}
} else {
foreach ($request['lookups'] as $id => $lookup) {
$this->processPendingLookup($id);
Expand Down

0 comments on commit 6174dfd

Please sign in to comment.