mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
lib/model: Readd special handling of conn close in TestIssue5063 (#5743)
This partially reverts commit 64518b0f7e
.
This commit is contained in:
parent
64518b0f7e
commit
d91da8feee
@ -862,6 +862,16 @@ func TestIssue5063(t *testing.T) {
|
||||
m := newState(defaultAutoAcceptCfg)
|
||||
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{}
|
||||
|
||||
addAndVerify := func(id string) {
|
||||
|
Loading…
Reference in New Issue
Block a user