You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTTP connections to GitHub are managed by pygithub library. It
uses a connection pool, initialized when Github object is created (in
KPD we have one per BranchWorker), and the connections are actively
reused.
KPD creates the BranchWorkers, and by extension the Github objects,
only once at start up. However KPD runs the main sync_patches()
routine once every two minutes, which means that actual underlying
connections are very likely to become stale.
Of course, there is an encapsulated logic in pygithub to re-establish
the connections. However it appears that attempting to use a
connection that was never explicitly closed, causes issues when
interacting with ttlsproxy. In particular we often get
AsyncSocketException, which appears to be correlated with KPD's
misbehavior with respect to email notifications.
Attempt to mitigate these problems by re-creating GithubSync object
(which spawns BranchWorker-s) on every iteration of the main daemon
loop (that is: every 2 mins).
Differential Revision: D80043971
Reviewed-by: Song Liu <[email protected]>
Signed-off-by: Ihor Solodrai <[email protected]>
0 commit comments