I think there is no gap if you quit after you have filed the new one. I.e., you are in pending state, which is legal. But you cannot quit before you file a new one. But how does CIS know that you quit already if your old company does not send a letter to CIS (small companies seldom do so)?