Commit 53473b6
authored
fix: gnoNativeService: In RotatePassword, call Lock() after getSigner (#190)
In gnoNativeService, `RotatePassword` calls `Lock` at the beginning of
the function, then [calls
`getSigner`](https://github.com/gnolang/gnonative/blob/cdd7bcbfc3b932396e3c469f65859b772d35d44a/service/api.go#L285)
. But `getSigner` [calls
`RLock`](https://github.com/gnolang/gnonative/blob/cdd7bcbfc3b932396e3c469f65859b772d35d44a/service/service.go#L193)
which blocks, and `RotatePassword` never returns. (The effect is that
Gnokey Mobile hangs during "Change Master Password".) This PR changes
`RotatePassword` to call `Lock` after the loop which calls `getSigner`.
This was tested by doing `make npm.pack` and installing it locally in
Gnokey Mobile.
Signed-off-by: Jeff Thompson <[email protected]>1 parent cdd7bcb commit 53473b6
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | 278 | | |
282 | 279 | | |
283 | 280 | | |
| |||
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
| 287 | + | |
| 288 | + | |
290 | 289 | | |
291 | 290 | | |
292 | 291 | | |
| |||
0 commit comments