Skip to content

Commit

Permalink
fix: Incorrect conversion between integer types (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunzhuo authored Sep 16, 2022
1 parent 5f65f47 commit 6e08652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/rpc/invoker/mosn/mosninvoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (m *mosnInvoker) Invoke(ctx context.Context, req *rpc.RPCRequest) (resp *rp
if req.Timeout == 0 {
req.Timeout = rpc.DefaultRequestTimeoutMs
if ts, ok := req.Header[rpc.RequestTimeoutMs]; ok && len(ts) > 0 {
t, err := strconv.Atoi(ts[0])
t, err := strconv.ParseInt(ts[0], 10, 32)
if err == nil && t != 0 {
req.Timeout = int32(t)
}
Expand Down

0 comments on commit 6e08652

Please sign in to comment.