Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: fix failingListener data race in tests
WARNING: DATA RACE Read at 0x00c00002b788 by goroutine 44: github.com/emersion/go-smtp_test.(*failingListener).Close() /home/simon/src/go-smtp/server_test.go:193 +0x34 github.com/emersion/go-smtp.(*Server).Close() /home/simon/src/go-smtp/server.go:251 +0x181 github.com/emersion/go-smtp_test.TestServerAcceptErrorHandling() /home/simon/src/go-smtp/server_test.go:323 +0x771 testing.tRunner() /usr/lib/go/src/testing/testing.go:1689 +0x21e testing.(*T).Run.gowrap1() /usr/lib/go/src/testing/testing.go:1742 +0x44 Previous write at 0x00c00002b788 by goroutine 45: github.com/emersion/go-smtp_test.(*failingListener).Close() /home/simon/src/go-smtp/server_test.go:195 +0xdb github.com/emersion/go-smtp_test.TestServerAcceptErrorHandling.func1() /home/simon/src/go-smtp/server_test.go:316 +0xab Goroutine 44 (running) created at: testing.(*T).Run() /usr/lib/go/src/testing/testing.go:1742 +0x825 testing.runTests.func1() /usr/lib/go/src/testing/testing.go:2161 +0x85 testing.tRunner() /usr/lib/go/src/testing/testing.go:1689 +0x21e testing.runTests() /usr/lib/go/src/testing/testing.go:2159 +0x8be testing.(*M).Run() /usr/lib/go/src/testing/testing.go:2027 +0xf17 main.main() _testmain.go:163 +0x2bd Goroutine 45 (finished) created at: github.com/emersion/go-smtp_test.TestServerAcceptErrorHandling() /home/simon/src/go-smtp/server_test.go:314 +0x5d5 testing.tRunner() /usr/lib/go/src/testing/testing.go:1689 +0x21e testing.(*T).Run.gowrap1() /usr/lib/go/src/testing/testing.go:1742 +0x44
- Loading branch information