Merge pull request #3515 from element-hq/feature/bma/fixRageshakeCrash

Fix crash when session is deleted on another client
This commit is contained in:
Benoit Marty 2024-09-23 11:44:11 +02:00 committed by GitHub
commit 280f7383b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -34,6 +34,11 @@ internal class FormattedJsonHttpLogger(
// It can be only the case if we log the bodies of Http requests.
if (level != HttpLoggingInterceptor.Level.BODY) return
if (message.length > 100_000) {
Timber.d("Content is too long (${message.length} chars) to be formatted as JSON")
return
}
if (message.startsWith("{")) {
// JSON Detected
try {