You should provide a description of the experiment and .psyexp file so that the JS experts can take a look at it.
In any case, did you look at this?
I also seem to remember that loop termination was going to be implemented in PsychoPy 3.1.0. Did you try to update to that version?