Commit b62e97f
authored
fix(p2p): fix race condition caused by startTestNetwork (#801)
The `require.NotEmpty` utility reads through the struct fields of the
Host via reflection, while the internal background routine in the host
also accesses its field, causing race conditions. The fix is to use
`require.NotNil` as it only checks whether the Host is nil or not
without accessing its internal fields1 parent 8640e67 commit b62e97f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments