Skip to content

Commit

Permalink
Merge pull request #65 from cryptogarageinc/fix/multi-dynamic-session…
Browse files Browse the repository at this point in the history
…-stop-deadlock

fix: session.stop from quickfixgo/quickfix pr 531
  • Loading branch information
k-matsuzawa authored Dec 22, 2022
2 parents c3d0804 + db28272 commit 866dabd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type session struct {
stateTimer *internal.EventTimer
peerTimer *internal.EventTimer
sentReset bool
stopOnce sync.Once

targetDefaultApplVerID string

Expand Down Expand Up @@ -87,7 +88,10 @@ func (s *session) connect(msgIn <-chan fixIn, msgOut chan<- []byte) error {
type stopReq struct{}

func (s *session) stop() {
s.admin <- stopReq{}
//stop once
s.stopOnce.Do(func() {
s.admin <- stopReq{}
})
}

type waitChan <-chan interface{}
Expand Down

0 comments on commit 866dabd

Please sign in to comment.