private function continueFlow(ReactFlow $flow, Packet $packet)
    {
        try {
            $response = $flow->next($packet);
        } catch (\Exception $e) {
            $this->emitError($e);

            return;
        }

        if ($response !== null) {
            if ($this->writtenFlow !== null) {
                $this->sendingFlows[] = $flow;
            } else {
                $this->stream->write($response);
                $this->writtenFlow = $flow;
                $this->handleSend();
            }
        } elseif ($flow->isFinished()) {
            $this->loop->nextTick(function () use ($flow) {
                $this->finishFlow($flow);
            });
        }
    }