diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-08-25 15:53:55 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-08-25 15:53:55 -0700 |
| commit | f9bed5815c77a500c7b5006368e750f1d4c0af43 (patch) | |
| tree | da0a2ffb366521b97ae41cc4c27752ead6aac0d2 /indra/llcorehttp | |
| parent | d2dbd068fe99d88c371588565af1b1eaeb02441e (diff) | |
Issue #6181: Rather than silently dropping messages sent as a notify that were registered as async, send back an error to the caller.
Diffstat (limited to 'indra/llcorehttp')
| -rw-r--r-- | indra/llcorehttp/lljsonrpcws.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llcorehttp/lljsonrpcws.cpp b/indra/llcorehttp/lljsonrpcws.cpp index d6c5b0eb97..df76f6a2bf 100644 --- a/indra/llcorehttp/lljsonrpcws.cpp +++ b/indra/llcorehttp/lljsonrpcws.cpp @@ -207,16 +207,17 @@ void LLJSONRPCConnection::processRequest(const LLSD& request) // Async handler — launched as a coroutine, response sent by the lambda. if (is_notification) { - LL_WARNS("JSONRPC") << "Async method " << method - << " called as notification; ignoring" << LL_ENDL; - return; + LL_WARNS("JSONRPC") << "Method " << method + << " called as notification; rejecting request" << LL_ENDL; + throw InvalidRequest("Method " + method + " cannot be called as a notification"); } ptr_t conn = std::static_pointer_cast<LLJSONRPCConnection>(getSelfPtr()); if (!conn) { - LL_WARNS("JSONRPC") << "Connection expired before async method " << method - << " could be launched" << LL_ENDL; - return; + LL_WARNS("JSONRPC") << "Connection expired before method " << method + << " could be launched; failing request" << LL_ENDL; + throw InternalError("Connection expired before method " + method + + " could be launched"); } LLMainThreadTask::dispatch( [handler, method, id, params, conn]() |
