Skip to content

Commit 6e08652

Browse files
authored
fix: Incorrect conversion between integer types (#789)
1 parent 5f65f47 commit 6e08652

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/rpc/invoker/mosn/mosninvoker.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (m *mosnInvoker) Invoke(ctx context.Context, req *rpc.RPCRequest) (resp *rp
9696
if req.Timeout == 0 {
9797
req.Timeout = rpc.DefaultRequestTimeoutMs
9898
if ts, ok := req.Header[rpc.RequestTimeoutMs]; ok && len(ts) > 0 {
99-
t, err := strconv.Atoi(ts[0])
99+
t, err := strconv.ParseInt(ts[0], 10, 32)
100100
if err == nil && t != 0 {
101101
req.Timeout = int32(t)
102102
}

0 commit comments

Comments
 (0)