tls: handle errors before calling C++ methods
authorFedor Indutny <fedor.indutny@gmail.com>
Wed, 27 Mar 2013 08:18:43 +0000 (12:18 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Wed, 27 Mar 2013 12:26:24 +0000 (16:26 +0400)
commitae86fa84feca482c752bf8d8541e9e13e256a4ff
tree5e1d06a9a07485d1e7808e73aeb94921bbc45299
parent372911ffc75c124a0adea731608b0530c7d14837
tls: handle errors before calling C++ methods

Calling `this.pair.encrypted._internallyPendingBytes()` before
handling/resetting error will result in assertion failure:

../src/node_crypto.cc:962: void node::crypto::Connection::ClearError():
Assertion `handle_->Get(String::New("error"))->BooleanValue() == false'
failed.

see #5058
lib/tls.js
test/simple/test-tls-client-abort3.js [new file with mode: 0644]