Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Q quickfix
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 25
    • Merge requests 25
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • quickfixgo
  • quickfix
  • Issues
  • #401
Closed
Open
Issue created Apr 07, 2020 by Administrator@rootContributor

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:

https://github.com/quickfixgo/quickfix/blob/dd7be7759e815c5d6b0aeb83da097981d29c81a8/session_state.go#L26

When that happens, the following gofunc is blocked forever because the msgIn channel is never read:

https://github.com/quickfixgo/quickfix/blob/dd7be7759e815c5d6b0aeb83da097981d29c81a8/acceptor.go#L285

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!

Assignee
Assign to
Time tracking