Replacement for ConnectorTracker in Flow?

Hi,

while migrating a Vaadin 8 app to Flow 24 I stumbled across this:

if (UI.getCurrent().getConnectorTracker().isWritingResponse()) {
  synchronized (this) {
    this.wait(10);
  }
}

This is called before Binder writes back to the bean, so apparently the idea is to wait if there is currently something happening on the UI.

The ConnectorTracker does not exist anymore in Flow, so how would one do that today? Or is this obsolete?

Thanks!

I’d get rid of it and see if anything breaks

1 Like

Yes, will do that, but it might be hard to track if there are any side effects.
It’s always a bit uncomfortable to just remove something without really knowing if it should maybe be done in another way.

Having this in your old code looked more like “somebody found a bug and did not report it, instead they added a workaround for something that should have been fixed by the Framework”.

1 Like

That’s probably true.
(According to my recent experiences how reported bugs are treated, I can’t blame them, but that’s another story.)