wait for reader

This commit is contained in:
mrbesen 2023-11-26 20:40:21 +01:00
parent 7d9d5fad53
commit 57f7e69d4e
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,9 @@ std::string Crypt::encryptForChat(int64_t chat, const std::string& message) {
reader.start();
proc->waitFor(std::chrono::seconds(4));
proc->termKill(std::chrono::milliseconds(1));
reader.waitFor();
if(out.size() > Footer.size() + Header.size() ) {
out.resize(out.size() - Footer.size());