diff options
Diffstat (limited to 'source/compiler-core/slang-json-rpc-connection.cpp')
| -rw-r--r-- | source/compiler-core/slang-json-rpc-connection.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/compiler-core/slang-json-rpc-connection.cpp b/source/compiler-core/slang-json-rpc-connection.cpp index 79ffc9583..fbbd23d75 100644 --- a/source/compiler-core/slang-json-rpc-connection.cpp +++ b/source/compiler-core/slang-json-rpc-connection.cpp @@ -273,6 +273,10 @@ SlangResult JSONRPCConnection::sendCall( SlangResult JSONRPCConnection::waitForResult(Int timeOutInMs) { + // Invalidate m_jsonRoot before waitForResult, because when waitForResult fail, + // we don't want to use the result from the previous read. + m_jsonRoot.reset(); + SLANG_RETURN_ON_FAIL(m_connection->waitForResult(timeOutInMs)); return tryReadMessage(); } |
