Skip to content

Commit

Permalink
fixup! Close connection immediately during KeepAlive if it is not ass…
Browse files Browse the repository at this point in the history
…ociated with a worker (#4678)

This is a just-in-case-logic is the connection is somehow detached from all Builders, but still leaving the connection active
  • Loading branch information
YngveNPettersen committed Apr 6, 2024
1 parent 46b5b5d commit 49a32f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion master/buildbot/worker/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def newConnection(self, conn, workerName):
self.connections[workerName] = conn

def remove():
assert self.connections.get(workerName, None) == conn, f"Attempt to remove non-connection entry for {workerName}"
assert (
self.connections.get(workerName, None) == conn
), f"Attempt to remove non-connection entry for {workerName}"
del self.connections[workerName]

conn.notifyOnDisconnect(remove)
Expand Down

0 comments on commit 49a32f4

Please sign in to comment.