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

Fix data race when closing amqp connection #200

Closed
wants to merge 1 commit into from

Commits on Apr 28, 2016

  1. Fix data race when closing amqp connection

    When using conn.NotifyClose, this later append to a list of channels
    ``me.closes``, while conn.shutdown() range over this list, so when a
    connection is closed, ``conn.NotifyClose()`` may detect the connection closing
    in the same time as the ``conn.shutdown()`` call, this is done in two
    goroutine, which end up in data race where one appending to me.closes
    and the other looping over it.
    
    The fix is to move setting ``noNotify`` to True to the top of
    ``conn.shutdown()``, this way ``conn.NotifyClose()`` will not append to the
    list anymore.
    mouadino committed Apr 28, 2016
    Configuration menu
    Copy the full SHA
    1ea61c6 View commit details
    Browse the repository at this point in the history