You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2018/06/27 12:48:24 UTC
[thrift] branch master updated: THRIFT-4225: Delete callback if RPC
send failed
This is an automated email from the ASF dual-hosted git repository.
jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new d7b635f THRIFT-4225: Delete callback if RPC send failed
d7b635f is described below
commit d7b635f78471e424f5e8f2f40257f076cc2c249c
Author: Brian Forbis <bf...@athenahealth.com>
AuthorDate: Sat Jun 23 17:27:21 2018 -0400
THRIFT-4225: Delete callback if RPC send failed
---
compiler/cpp/src/thrift/generate/t_js_generator.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler/cpp/src/thrift/generate/t_js_generator.cc b/compiler/cpp/src/thrift/generate/t_js_generator.cc
index 512fe3c..57baa9b 100644
--- a/compiler/cpp/src/thrift/generate/t_js_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_js_generator.cc
@@ -1613,10 +1613,11 @@ void t_js_generator::generate_service_client(t_service* tservice) {
indent_down();
f_service_ << indent() << "}" << endl;
- // Reset the transport if there was a serialization error
+ // Reset the transport and delete registered callback if there was a serialization error
f_service_ << indent() << "catch (e) {" << endl;
indent_up();
if (gen_node_) {
+ f_service_ << indent() << "delete this._reqs[this.seqid()];" << endl;
f_service_ << indent() << "if (typeof " << outputVar << ".reset === 'function') {" << endl;
f_service_ << indent() << " " << outputVar << ".reset();" << endl;
f_service_ << indent() << "}" << endl;