Opened 7 years ago

Closed 7 years ago

#8606 closed defect (worksforme)

Controller's extend_circuit() fails to remove temporary listeners

Reported by: atagar Owned by: atagar
Priority: Low Milestone:
Component: Archived/Stem Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


When the extend_circuit() method is called with await_build as True it attaches a temporary event listener (add_event_listener()). It looks like we never detach this, so repeated calls will accumulate listeners. This won't result in errors, but it will impact performance if we accumulate a lot of them.

We should either...

  1. detach the listener when we're done with it, even in error conditions
  1. reuse the listener if one has already been attached

Child Tickets

Change History (2)

comment:1 Changed 7 years ago by Desoxy

Unless I am missing something, option a has already been implemented by you when you added the await_build feature; there is a try..finally in Controller.extend_circuit() that removes the listener again if it exists.

comment:2 Changed 7 years ago by atagar

Resolution: worksforme
Status: newclosed

Oops! I missed that. Thanks.

Note: See TracTickets for help on using tickets.