Unverified Commit 7d894e55 authored by Ge Jun's avatar Ge Jun Committed by GitHub

Merge pull request #773 from zyearn/fix_backup_using_h2

Fix backup req using h2
parents 8fe8640e 7384bf7b
......@@ -690,7 +690,7 @@ inline bool does_error_affect_main_socket(int error_code) {
error_code == EINVAL/*returned by connect "0.0.0.1"*/;
}
//Note: A RPC call is probably consisted by serveral individual Calls such as
//Note: A RPC call is probably consisted by several individual Calls such as
// retries and backup requests. This method simply cares about the error of
// this very Call (specified by |error_code|) rather than the error of the
// entire RPC (specified by c->FailedInline()).
......
......@@ -1449,10 +1449,10 @@ private:
void H2UnsentRequest::DestroyStreamUserData(SocketUniquePtr& sending_sock,
Controller* cntl,
int /*error_code*/,
int error_code,
bool /*end_of_rpc*/) {
RemoveRefOnQuit deref_self(this);
if (sending_sock != NULL && cntl->ErrorCode() != 0) {
if (sending_sock != NULL && error_code != 0) {
CHECK_EQ(cntl, _cntl);
std::unique_lock<butil::Mutex> mu(_mutex);
_cntl = NULL;
......
......@@ -66,8 +66,8 @@ public:
// Params:
// sending_sock: The socket chosen by OnCreatingStream(), if an error
// happens during choosing, the enclosed socket is NULL.
// cntl: contexts of the RPC
// error_code: Use this instead of cntl->ErrorCode()
// cntl: contexts of the RPC.
// error_code: Use this instead of cntl->ErrorCode().
// end_of_rpc: true if the RPC is about to destroyed.
virtual void DestroyStreamUserData(SocketUniquePtr& sending_sock,
Controller* cntl,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment