]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/tasks/node/decoder/class_NodePackageDecoderTask.php
Use array_push() instead of [] as array_push() checks if parameter 1 is really an...
[hub.git] / application / hub / main / tasks / node / decoder / class_NodePackageDecoderTask.php
index 44f717e5e0707104a169baa007dcfffd473b560e..0d3393a426ef893130b73dedaccc9a603da74178 100644 (file)
@@ -74,13 +74,16 @@ class NodePackageDecoderTask extends BaseTask implements Taskable, Visitable {
         * @return      void
         */
        public function executeTask () {
+               // "Cache" decoder instance
+               $decoderInstance = $this->getDecoderInstance();
+
                // Check if the stacker has some entries left
-               if ($this->getDecoderInstance()->ifUnhandledRawPackageDataLeft()) {
+               if ($decoderInstance->ifUnhandledRawPackageDataLeft()) {
                        // Then handle it
-                       $this->getDecoderInstance()->handleRawPackageData();
-               } elseif ($this->getDecoderInstance()->ifDeocedPackagesLeft()) {
+                       $decoderInstance->handleRawPackageData();
+               } elseif ($decoderInstance->ifDeocedPackagesLeft()) {
                        // Some decoded packages have arrived (for this peer)
-                       $this->getDecoderInstance()->handleDecodedPackage();
+                       $decoderInstance->handleDecodedPackage();
                }
        }
 }