]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/tasks/network/class_NetworkPackageReaderTask.php
Switched around sub-tasks, commented out noisy debug line
[hub.git] / application / hub / main / tasks / network / class_NetworkPackageReaderTask.php
index 7e10c0e84044dee71e3d4a12a34aaed4689c2ddc..da672097a97d43e8b093c26151a11b500a10f36b 100644 (file)
@@ -74,9 +74,9 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
         */
        public function executeTask () {
                // Do we have something to handle?
-               if ($this->getPackageInstance()->isNewRawDataPending($this->getListenerPoolInstance())) {
-                       // We have to handle raw data from the socket
-                       $this->getPackageInstance()->handleIncomingDecodedData();
+               if ($this->getPackageInstance()->isNewPackageArrived()) {
+                       // Okay, then handle newly arrived package
+                       $this->getPackageInstance()->handleNewlyArrivedPackage();
                } elseif ($this->getPackageInstance()->isIncomingDecodedDataHandled()) {
                        /*
                         * We have handled decoded data so we should validate it, if we have
@@ -84,9 +84,9 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
                         * network package.
                         */
                        $this->getPackageInstance()->assembleDecodedDataToPackage();
-               } elseif ($this->getPackageInstance()->isNewPackageArrived()) {
-                       // Okay, then handle newly arrived package
-                       $this->getPackageInstance()->handleNewlyArrivedPackage();
+               } elseif ($this->getPackageInstance()->isNewRawDataPending($this->getListenerPoolInstance())) {
+                       // We have to handle raw data from the socket
+                       $this->getPackageInstance()->handleIncomingDecodedData();
                } // END - if
        }
 }