File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,10 @@ TLSWrap::~TLSWrap() {
90
90
MakePending ();
91
91
92
92
// And destroy
93
- while (WriteItem* wi = pending_write_items_.PopFront ())
93
+ while (WriteItem* wi = pending_write_items_.PopFront ()) {
94
+ wi->w_ ->Done (UV_ECANCELED);
94
95
delete wi;
96
+ }
95
97
96
98
ClearError ();
97
99
}
@@ -310,10 +312,12 @@ void TLSWrap::EncOut() {
310
312
write_req->Dispatched ();
311
313
312
314
// Ignore errors, this should be already handled in js
313
- if (err)
315
+ if (err) {
314
316
write_req->Dispose ();
315
- else
317
+ InvokeQueued (err);
318
+ } else {
316
319
NODE_COUNT_NET_BYTES_SENT (write_size_);
320
+ }
317
321
}
318
322
319
323
@@ -335,6 +339,9 @@ void TLSWrap::EncOutCb(WriteWrap* req_wrap, int status) {
335
339
// Commit
336
340
NodeBIO::FromBIO (wrap->enc_out_ )->Read (nullptr , wrap->write_size_ );
337
341
342
+ // Ensure that the progress will be maed and `InvokeQueued` will be called
343
+ wrap->ClearIn ();
344
+
338
345
// Try writing more data
339
346
wrap->write_size_ = 0 ;
340
347
wrap->EncOut ();
You can’t perform that action at this time.
0 commit comments