Skip to content

Conversation

arnecls
Copy link
Contributor

@arnecls arnecls commented Apr 12, 2019

The purpose of this pull request

This fixes a bug in consumer.socket that may occur during shutdown.
The reason is that closeSocket() is called by the main thread as well as the listener thread and might cause cons.listener to be nil after passing the nil check.

This PR adds a mutex to solve that race condition

Checklist

  • make test executed successfully

@arnecls arnecls added the bug label Apr 12, 2019
@arnecls arnecls added this to the v0.6.0 milestone Apr 12, 2019
@arnecls arnecls requested a review from msiebeneicher April 12, 2019 13:24
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 71.665% when pulling ffe09bd on fix-socket-consumer-race-close into 892ba2d on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 71.665% when pulling ffe09bd on fix-socket-consumer-race-close into 892ba2d on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 71.665% when pulling ffe09bd on fix-socket-consumer-race-close into 892ba2d on master.

@arnecls arnecls merged commit 76daddd into master Apr 13, 2019
@arnecls arnecls deleted the fix-socket-consumer-race-close branch April 13, 2019 20:25
arnecls added a commit that referenced this pull request Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants