Skip to content

Commit 69e72b7

Browse files
committed
Clear existing messages of all types
cursor suggestion
1 parent 89e5557 commit 69e72b7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/primary/primary_client.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,18 @@ bool PrimaryClient::sendScriptBlocking(const std::string& program, std::string s
173173
URCL_LOG_ERROR(ss.str().c_str());
174174
return false;
175175
}
176-
176+
// Clear runtime exception
177177
{
178178
std::scoped_lock lock(runtime_exception_mutex_);
179179
latest_runtime_exception_ = nullptr;
180180
}
181+
// Clear existing error codes
182+
getErrorCodes();
183+
// Clear key messages
184+
{
185+
std::scoped_lock lock(key_message_queue_mutex_);
186+
key_message_queue_.clear();
187+
}
181188

182189
bool script_sent = sendScript(script_info.script_code);
183190
if (!script_sent)

0 commit comments

Comments
 (0)