tls: invoke write cb only after opposite read end
authorFedor Indutny <fedor.indutny@gmail.com>
Mon, 27 May 2013 10:44:33 +0000 (14:44 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 28 May 2013 18:27:07 +0000 (22:27 +0400)
commit4f14221f03516b30ea4fba3117f7f9e169ac82da
tree7c9a14c74e0184994d9191bf76c1666ee28bdd58
parentfa170dd2b241bc0f22f88071158686075c3b269e
tls: invoke write cb only after opposite read end

Stream's `._write()` callback should be invoked only after it's opposite
stream has finished processing incoming data, otherwise `finish` event
fires too early and connection might be closed while there's some data
to send to the client.

see #5544
lib/tls.js
test/simple/test-tls-client-destroy-soon.js [new file with mode: 0644]