File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1232,6 +1232,21 @@ void
1232
1232
br_ssl_engine_close (br_ssl_engine_context * cc )
1233
1233
{
1234
1234
if (!br_ssl_engine_closed (cc )) {
1235
+ /*
1236
+ * If we are not already closed, then we need to
1237
+ * initiate the closure. Once closing, any incoming
1238
+ * application data is discarded; we should also discard
1239
+ * application data which is alreayd there but has not
1240
+ * been acknowledged by the application yet (this mimics
1241
+ * usual semantics on BSD sockets: you cannot read()
1242
+ * once you called close(), even if there was some
1243
+ * unread data already buffered).
1244
+ */
1245
+ size_t len ;
1246
+
1247
+ if (br_ssl_engine_recvapp_buf (cc , & len ) != NULL && len != 0 ) {
1248
+ br_ssl_engine_recvapp_ack (cc , len );
1249
+ }
1235
1250
jump_handshake (cc , 1 );
1236
1251
}
1237
1252
}
You can’t perform that action at this time.
0 commit comments