Commit 93fe03a
authored
fix(loadbalance): prevent panic in consistent hash toKey for non-string args (#3430)
The hard type assertion args[i].(string) panics for any non-string
argument (int, struct, etc.), while Java Dubbo uses toString() which
never fails. Replace with fmt.Fprint(&sb, args[i]) which safely
converts any type to its string representation.1 parent e741e0e commit 93fe03a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments