Skip to content

Commit

Permalink
Merge pull request #132 from kroese/master
Browse files Browse the repository at this point in the history
fix: Clamp Event strings
  • Loading branch information
hoytech authored Dec 20, 2024
2 parents 2fb8551 + 13fdafa commit baf3ec5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/WriterPipeline.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include<string.h>
#include <hoytech/protected_queue.h>

#include "golpe.h"
Expand Down Expand Up @@ -71,7 +72,10 @@ struct WriterPipeline {
try {
parseAndVerifyEvent(m.eventJson, secpCtx, verifyMsg, verifyTime, packedStr, jsonStr);
} catch (std::exception &e) {
if (verboseReject) LW << "Rejected event: " << m.eventJson << " reason: " << e.what();
if (verboseReject) {
jsonStr = tao::json::to_string(m.eventJson).substr(0,200);
LW << "Rejected event: " << jsonStr << " reason: " << e.what();
}
numLive--;
totalRejected++;
continue;
Expand Down

0 comments on commit baf3ec5

Please sign in to comment.