HomePhabricator

net: split CConnman::SocketHandler()

Description

net: split CConnman::SocketHandler()

Summary:
CConnman::SocketHandler() does 3 things:

  1. Check sockets for readiness
  2. Process ready listening sockets
  3. Process ready connected sockets

Split the processing (2. and 3.) into separate methods to make the code
easier to grasp.

Also, move the processing of listening sockets after the processing of
connected sockets to make it obvious that there is no dependency and
also explicitly release the snapshot before dealing with listening
sockets - it is only necessary for the connected sockets part.

This concludes backport of core#21943
https://github.com/bitcoin/bitcoin/pull/21943/commits/f52b6b2d9f482353821da0ef4c485c402a396c8

Depends on D17107

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, roqqit

Reviewed By: roqqit

Subscribers: roqqit

Differential Revision: https://reviews.bitcoinabc.org/D17108

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Oct 25 2021, 09:03
PiRKCommitted on Wed, Nov 13, 17:33
PiRKPushed on Wed, Nov 13, 17:33
Reviewer
roqqit
Differential Revision
D17108: net: split CConnman::SocketHandler()
Parents
rABC32e377f69f42: net: keep reference to each node during socket wait
Branches
Unknown
Tags
Unknown