Commits

Wei Cheng Pan  committed 92a48f8

Fix record issue.

  • Participants
  • Parent commits a7b527b
  • Branches develop

Comments (0)

Files changed (1)

File Krapture/server/src/TestUnit/TestUnit.cpp

 oracleCheckPoints() {
 	// input handler
 	this->commands.insert( std::make_pair( "<Input>", [this]( const QVariant & data )->void {
+		if( !this->server->isRecording() ) {
+			return;
+		}
+
 		auto kwargs = data.toMap();
 
 		auto object = kwargs.value( "object" ).toString();
 
 void TestUnit::Private::onReadyRead() {
 	auto packet = this->socket->read();
-	// only if in record mode
-	if( !this->server->isRecording() ) {
-		return;
-	}
-
 	auto it = this->commands.find( packet.first );
 	if( it == this->commands.end() ) {
 		// TODO report error