diff options
author | Valery Piashchynski <[email protected]> | 2021-09-15 00:00:07 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-15 00:00:07 +0300 |
commit | 6846141b15ed69036cb180307fde34913e8c1b77 (patch) | |
tree | f11a346fb8c10c65419e804ea4c48c25596b20b5 | |
parent | fc67803c6860942e6ac88907e11c94431ccce86a (diff) |
Atoi -> ParseUint(..,10, 32). Int in the string might be bigger, that
uint32, we should parse it properly.
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | plugins/grpc/proxy/proxy.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/grpc/proxy/proxy.go b/plugins/grpc/proxy/proxy.go index 7a8eaa1f..14655e0d 100644 --- a/plugins/grpc/proxy/proxy.go +++ b/plugins/grpc/proxy/proxy.go @@ -182,7 +182,7 @@ func wrapError(err error) error { chunks := strings.Split(err.Error(), "|:|") code := codes.Internal - if phpCode, errConv := strconv.Atoi(chunks[0]); errConv == nil { + if phpCode, errConv := strconv.ParseUint(chunks[0], 10, 32); errConv == nil { code = codes.Code(phpCode) } |