summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-15 00:00:07 +0300
committerValery Piashchynski <[email protected]>2021-09-15 00:00:07 +0300
commit6846141b15ed69036cb180307fde34913e8c1b77 (patch)
treef11a346fb8c10c65419e804ea4c48c25596b20b5
parentfc67803c6860942e6ac88907e11c94431ccce86a (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.go2
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)
}