From c7e2c457eb8480625b114caf0ae4312a7bd1111f Mon Sep 17 00:00:00 2001 From: Jason Peng Date: Mon, 25 Oct 2021 10:51:49 +0800 Subject: [PATCH] Fix: heartbeat's timeout will modify consumer's timeout (#1532) * improve etcd version and change create to put (#1203) * fix: CONTRIBUTING.md url error. (#1303) * add lock (#1304) * Revert "add lock (#1304)" (#1329) This reverts commit a10996763e3e1ffa5cdbd80cb49319a4e3626994. * build(deps): bump github.com/dubbogo/gost from 1.11.14 to 1.11.16 (#1387) Bumps [github.com/dubbogo/gost](https://github.com/dubbogo/gost) from 1.11.14 to 1.11.16. - [Release notes](https://github.com/dubbogo/gost/releases) - [Commits](https://github.com/dubbogo/gost/compare/v1.11.14...v1.11.16) --- updated-dependencies: - dependency-name: github.com/dubbogo/gost dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/protobuf from 1.26.0 to 1.27.1 (#1386) Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.26.0 to 1.27.1. - [Release notes](https://github.com/protocolbuffers/protobuf-go/releases) - [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash) - [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.26.0...v1.27.1) --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump go.etcd.io/etcd/client/v3 from 3.5.0-alpha.0 to 3.5.0 (#1383) Bumps [go.etcd.io/etcd/client/v3](https://github.com/etcd-io/etcd) from 3.5.0-alpha.0 to 3.5.0. - [Release notes](https://github.com/etcd-io/etcd/releases) - [Changelog](https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.5.md) - [Commits](https://github.com/etcd-io/etcd/compare/v3.5.0-alpha.0...v3.5.0) --- updated-dependencies: - dependency-name: go.etcd.io/etcd/client/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: heartbeat's timeout will modify consumer's timeout Co-authored-by: AlexStocks Co-authored-by: randy Co-authored-by: LaurenceLiZhixin <382673304@qq.com> Co-authored-by: Zhiqiang Li Co-authored-by: tyltr <31768692+tylitianrui@users.noreply.github.com> Co-authored-by: Laurence <45508533+LaurenceLiZhixin@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: yuyu.zx Co-authored-by: fangyincheng --- remoting/getty/listener.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remoting/getty/listener.go b/remoting/getty/listener.go index 622d5575c2..fc9d2f4cfb 100644 --- a/remoting/getty/listener.go +++ b/remoting/getty/listener.go @@ -373,7 +373,7 @@ func heartbeat(session getty.Session, timeout time.Duration, callBack func(err e req.Event = true resp := remoting.NewPendingResponse(req.ID) remoting.AddPendingResponse(resp) - totalLen, sendLen, err := session.WritePkg(req, 3*time.Second) + totalLen, sendLen, err := session.WritePkg(req, -1) if sendLen != 0 && totalLen != sendLen { logger.Warnf("start to close the session at heartbeat because %d of %d bytes data is sent success. err:%+v", sendLen, totalLen, err) go session.Close()