Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close()时reconnect()会导致ClientConn的Race问题 #41

Open
tiaoyu opened this issue Aug 4, 2022 · 0 comments
Open

Close()时reconnect()会导致ClientConn的Race问题 #41

tiaoyu opened this issue Aug 4, 2022 · 0 comments

Comments

@tiaoyu
Copy link

tiaoyu commented Aug 4, 2022

==================
WARNING: DATA RACE
Write at 0x00c00018e080 by main goroutine:
github.com/leesper/tao.(*ClientConn).reconnect()
F:/workspace/tao/conn.go:440 +0x36f
github.com/leesper/tao.(*ClientConn).Close.func1()
F:/workspace/tao/conn.go:418 +0x3f0
sync.(*Once).doSlow()
C:/Program Files/Go/src/sync/once.go:68 +0x127
sync.(*Once).Do()
C:/Program Files/Go/src/sync/once.go:59 +0x46
github.com/leesper/tao.(*ClientConn).Close()
F:/workspace/tao/conn.go:381 +0x64
main.main·dwrap·2()
F:/workspace/tao/examples/chat/client/client.go:50 +0x39
main.main()
F:/workspace/tao/examples/chat/client/client.go:68 +0x745

Previous read at 0x00c00018e080 by goroutine 12:
github.com/leesper/tao.(*ClientConn).Close()
F:/workspace/tao/conn.go:381 +0x4e
github.com/leesper/tao.handleLoop.func1()
F:/workspace/tao/conn.go:733 +0x26b
github.com/leesper/tao.handleLoop()
F:/workspace/tao/conn.go:740 +0x10c8
github.com/leesper/tao.(*ClientConn).Start·dwrap·11()
F:/workspace/tao/conn.go:374 +0x66

Goroutine 12 (running) created at:
github.com/leesper/tao.(*ClientConn).Start()
F:/workspace/tao/conn.go:374 +0x2b0
main.main()
F:/workspace/tao/examples/chat/client/client.go:52 +0x3e4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant