quickfixgo / quickfix

The Go FIX Protocol Library :rocket:
https://www.quickfixgo.org/
Other
735 stars 288 forks source link

Initiator got stuck during stopping procedure #666

Closed filinvadim closed 1 week ago

filinvadim commented 2 weeks ago

First of all please excuse me for a lack of information - this is all i have honestly.

I have stopping function wrapper:

func stopInitiator() {
    stopChan := make(chan struct{})
    go func() {
        f.cli.Stop()
        close(stopChan)
    }()
    select {
    case <-stopChan:
    case <-time.After(time.Minute):
        panic("fix initiator stopping timeout")
    }
}

Expected behavior: successful initiator stopping. Given behavior: initiator.Stop() method got stuck eternally -> panic.

ackleymi commented 1 week ago

Hi, I found a bug with initiator stops hanging, I fixed it here - https://github.com/quickfixgo/quickfix/pull/669. Please let me know if you have further thoughts.