[education/rkward] rkward/rbackend: Can readLine() get stuck?

Thomas Friedrichsmeier null at kde.org
Mon Aug 1 06:51:16 BST 2022


Git commit 89e36fc210e261a7e4427462a27bd6327732cc78 by Thomas Friedrichsmeier.
Committed on 01/08/2022 at 05:51.
Pushed by tfry into branch 'master'.

Can readLine() get stuck?

M  +3    -0    rkward/rbackend/rkfrontendtransmitter.cpp

https://invent.kde.org/education/rkward/commit/89e36fc210e261a7e4427462a27bd6327732cc78

diff --git a/rkward/rbackend/rkfrontendtransmitter.cpp b/rkward/rbackend/rkfrontendtransmitter.cpp
index 2142adc7..4492dfbe 100644
--- a/rkward/rbackend/rkfrontendtransmitter.cpp
+++ b/rkward/rbackend/rkfrontendtransmitter.cpp
@@ -172,8 +172,11 @@ QString RKFrontendTransmitter::waitReadLine (QIODevice* con, int msecs) {
 	time.start();
 	QByteArray ret;
 	do {
+		RK_DEBUG(RBACKEND, DL_DEBUG, "Time %d, buffer %d, available %d", QDateTime::currentMSecsSinceEpoch(), ret.length(), con->bytesAvailable());
 		ret.append(con->readLine());
+		RK_DEBUG(RBACKEND, DL_DEBUG, "Time2 %d, buffer %d, available %d", QDateTime::currentMSecsSinceEpoch(), ret.length(), con->bytesAvailable());
 		if (ret.contains('\n')) break;
+		RK_DEBUG(RBACKEND, DL_DEBUG, "Time3 %d", QDateTime::currentMSecsSinceEpoch());
 		con->waitForReadyRead(500);
 	} while(time.elapsed() < msecs);
 	return QString::fromLocal8Bit(ret);


More information about the rkward-tracker mailing list