Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "event: unlock mutex before sending event on channel"
This change causes a data race: ``` ================== WARNING: DATA RACE Write at 0x00c0003b6b50 by goroutine 167: runtime.closechan() /usr/local/go/src/runtime/chan.go:334 +0x0 github.com/fsouza/go-dockerclient.(*eventMonitoringState).disableEventMonitoring() /code/event.go:191 +0x10e github.com/fsouza/go-dockerclient.(*Client).RemoveEventListener() /code/event.go:113 +0xd1 github.com/fsouza/go-dockerclient.testEventListeners.func2() /code/event_test.go:238 +0x46 github.com/fsouza/go-dockerclient.testEventListeners() /code/event_test.go:269 +0x1022 github.com/fsouza/go-dockerclient.TestTLSEventListeners() /code/event_test.go:28 +0x8e testing.tRunner() /usr/local/go/src/testing/testing.go:862 +0x163 Previous read at 0x00c0003b6b50 by goroutine 410: runtime.chansend() /usr/local/go/src/runtime/chan.go:142 +0x0 github.com/fsouza/go-dockerclient.(*Client).eventHijack.func1() /code/event.go:356 +0x65d Goroutine 167 (running) created at: testing.(*T).Run() /usr/local/go/src/testing/testing.go:913 +0x699 testing.runTests.func1() /usr/local/go/src/testing/testing.go:1154 +0xa8 testing.tRunner() /usr/local/go/src/testing/testing.go:862 +0x163 testing.runTests() /usr/local/go/src/testing/testing.go:1152 +0x523 testing.(*M).Run() /usr/local/go/src/testing/testing.go:1069 +0x2eb main.main() _testmain.go:656 +0x222 Goroutine 410 (finished) created at: github.com/fsouza/go-dockerclient.(*Client).eventHijack() /code/event.go:344 +0x56a github.com/fsouza/go-dockerclient.(*eventMonitoringState).connectWithRetry() /code/event.go:255 +0xdc github.com/fsouza/go-dockerclient.(*eventMonitoringState).monitorEvents() /code/event.go:217 +0xba ================== ``` My bad x) Related to #511. This reverts commit a107859.
- Loading branch information