Skip to content

Close connection pool sockets properly#562

Merged
franku merged 7 commits intomasterfrom
dev/franku/master/connection-pool-fix
Aug 28, 2020
Merged

Close connection pool sockets properly#562
franku merged 7 commits intomasterfrom
dev/franku/master/connection-pool-fix

Conversation

@franku
Copy link
Contributor

@franku franku commented Jul 23, 2020

  • added CustomCallback to the bnet server that runs once a second
  • the CustomCallback runs connection_pool->cleanup()
  • cleanup() closes a socket as soon as it is not used anymore

@franku franku force-pushed the dev/franku/master/connection-pool-fix branch from 73226a3 to e58ce6c Compare July 23, 2020 09:03
@franku franku force-pushed the dev/franku/master/connection-pool-fix branch from b1a91d9 to fd4a268 Compare August 12, 2020 14:41
franku added 3 commits August 14, 2020 10:46
- added CustomCallback to the bnet server that runs once a second
- the CustomCallback runs connection_pool->cleanup()
- cleanup() closes a socket as soon as it is not used anymore
- remove unneeded functions
- rename NULL by nullptr
- cleanup the code partly
@franku franku force-pushed the dev/franku/master/connection-pool-fix branch from fd4a268 to a03f7bb Compare August 14, 2020 08:49
franku added 3 commits August 14, 2020 11:31
- rename or remove confusing variables
- move code into separate functions
- set SO_REUSEADDR always on
- set SO_KEEPALIVE always on because nokeepalive was always false
@franku franku force-pushed the dev/franku/master/connection-pool-fix branch from 3ee43dd to 321e436 Compare August 14, 2020 09:31
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thank you!

@franku
Copy link
Contributor Author

franku commented Aug 27, 2020

Build succeeded with #28, should be merged.

@franku franku merged commit 66a02b5 into master Aug 28, 2020
@franku franku deleted the dev/franku/master/connection-pool-fix branch August 28, 2020 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants