lib/model: Readd special handling of conn close in TestIssue5063 (#5743)
This partially reverts commit 64518b0f7e74ad5f6d42f9a3b6ffc1f74b61c2f0.
This commit is contained in:
parent
64518b0f7e
commit
d91da8feee
@ -862,6 +862,16 @@ func TestIssue5063(t *testing.T) {
|
|||||||
m := newState(defaultAutoAcceptCfg)
|
m := newState(defaultAutoAcceptCfg)
|
||||||
defer cleanupModel(m)
|
defer cleanupModel(m)
|
||||||
|
|
||||||
|
m.pmut.Lock()
|
||||||
|
for _, c := range m.conn {
|
||||||
|
conn := c.(*fakeConnection)
|
||||||
|
conn.mut.Lock()
|
||||||
|
conn.closeFn = func(_ error) {}
|
||||||
|
conn.mut.Unlock()
|
||||||
|
defer m.Closed(c, errStopped) // to unblock deferred m.Stop()
|
||||||
|
}
|
||||||
|
m.pmut.Unlock()
|
||||||
|
|
||||||
wg := sync.WaitGroup{}
|
wg := sync.WaitGroup{}
|
||||||
|
|
||||||
addAndVerify := func(id string) {
|
addAndVerify := func(id string) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user