The patch fixes two issues:
Fix the test case so that it passes in the same filter
The connecting flag should be set to false initially
Set up the connected handler before connect
Revert "Fix the test case so that it passes in the same filter"
This reverts commit 7538601.
This fix breaks everything :) Have you tried to run tests?
Only call the orginal method once