From 5b74f82edbaa21e9f629a152cbb12056d4b9664b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Tue, 23 Jul 2024 16:26:59 +0200 Subject: [PATCH] etcd: fix int overflow goxc fails with: Error: database/etcddb/database.go:17:25: cannot use 2048 * 1024 * 1024 (untyped int constant 2147483648) as int value in struct literal (overflows) --- database/etcddb/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/etcddb/database.go b/database/etcddb/database.go index f69eee7e..761c81fe 100644 --- a/database/etcddb/database.go +++ b/database/etcddb/database.go @@ -14,8 +14,8 @@ func internalOpen(url string) (*clientv3.Client, error) { cfg := clientv3.Config{ Endpoints: []string{url}, DialTimeout: 30 * time.Second, - MaxCallSendMsgSize: 2048 * 1024 * 1024, - MaxCallRecvMsgSize: 2048 * 1024 * 1024, + MaxCallSendMsgSize: (2048 * 1024 * 1024) - 1, + MaxCallRecvMsgSize: (2048 * 1024 * 1024) - 1, DialKeepAliveTimeout: 7200 * time.Second, }