diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-16 14:02:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 14:02:33 -0700 |
commit | ce314425d1e1ab5703c41510a0dba569fb6ffad3 (patch) | |
tree | ec7161d5ce785f3fefde97f5be6994f32adfbb2e /app/app_test.go | |
parent | 868bd76f404158763f54d59f2c7284fe1a4029c8 (diff) | |
download | chat-ce314425d1e1ab5703c41510a0dba569fb6ffad3.tar.gz chat-ce314425d1e1ab5703c41510a0dba569fb6ffad3.tar.bz2 chat-ce314425d1e1ab5703c41510a0dba569fb6ffad3.zip |
Fix webconn shutdown race (#7631)
* fix webconn shutdown race
* make sure writePump returns promptly if readPump returns first
* fix app shutdown race
* minor improvement
Diffstat (limited to 'app/app_test.go')
-rw-r--r-- | app/app_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/app_test.go b/app/app_test.go index 00d08fb14..6f2a3a23a 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -46,3 +46,11 @@ func TestMain(m *testing.M) { status = m.Run() } + +func TestAppRace(t *testing.T) { + for i := 0; i < 10; i++ { + a := New() + a.StartServer() + a.Shutdown() + } +} |