Commit f6f8f6b
AKRAM@il.ibm.com
Fix: Ensure Done() is called on external wallets even on errors
Use defer to guarantee that Done() is called on all external wallet signers
regardless of whether errors occur during signature collection, auditing,
or approval phases. This prevents resource leaks when the endorsement
process fails early.
Previously, if requestSignaturesOnIssues or requestSignaturesOnTransfers
returned an error, any external wallets already added to the map would
not have their Done() method called, potentially leaving resources uncleaned.1 parent c167f63 commit f6f8f6b
1 file changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
| |||
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
0 commit comments