mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-27 12:26:24 +00:00
Fix not reading last TLS small record with fast closure
Fixes #3104 MbedTLS API fairplay
This commit is contained in:
1 parent
3861e2e1e7
commit
8e0212c3db
4 files changed
+15
-7
No files matched your search
+1
-1
@@ -291,7 +291,7 @@ static void read_conn(struct mg_connection *c) {
|
||||
if (c->rtls.len == 0 || m < 0) {
|
||||
// Close only when we have fully drained both rtls and TLS buffers
|
||||
c->is_closing = 1; // or there's nothing we can do about it.
|
||||
m = MG_IO_ERR;
|
||||
if (m < 0) m = MG_IO_ERR; // but return last record data, see #3104
|
||||
} else { // see #2885
|
||||
// TLS buffer is capped to max record size, even though, there can
|
||||
// be more than one record, give TLS a chance to process them.
|
||||
|
||||
Reference in new issue
Block a user