check_tls: use static buffer.

This commit is contained in:
levlam 2022-01-13 18:14:40 +03:00
parent 7974571615
commit ca2cf957b0

View File

@ -156,7 +156,7 @@ td::Result<TlsInfo> test_tls(const td::string &url) {
size_t server_hello_length = 0; size_t server_hello_length = 0;
size_t encrypted_application_data_length_sum = 0; size_t encrypted_application_data_length_sum = 0;
while (td::Time::now() < end_time) { while (td::Time::now() < end_time) {
char buf[20000]; static char buf[20000];
TRY_RESULT(res, socket.read(td::MutableSlice{buf, sizeof(buf)})); TRY_RESULT(res, socket.read(td::MutableSlice{buf, sizeof(buf)}));
if (res > 0) { if (res > 0) {
auto read_length = [&]() -> size_t { auto read_length = [&]() -> size_t {