Acceptor gofunc is stuck when connection is outside of session time
Created by: agustintorres
I believe that the msgIn channel created by acceptor.go is not properly drained, resulting in a gofunc being stuck on the msgIn channel forever. This occurs when a connection is outside of session time, i.e. when the following line executes:
When that happens, the following gofunc is blocked forever because the msgIn channel is never read:
I believe that this can be fixed by draining the msgIn channel onDisconnect(), right before setting it to nil on this line:
https://github.com/quickfixgo/quickfix/blob/dd7be7759e815c5d6b0aeb83da097981d29c81a8/session.go#L689
In other words, just adding this line:
<-s.messageIn
Please let me know if I'm missing something or if you agree this is an issue. If you agree this is an issue, I'm not sure if my proposed solution is the best one since I'm not an expert on your code base, but if you agree with the solution then it's in PR #402.
Thanks!