This is easily reproduced when with k8s if the SBA host name cannot be resolved.
The problem is that the first registration occurs during the application's startup - subsequent registrations are done using a "daemonic" threading.Timer() and therefore don't block the main thread.
To reproduce, you can start nc -l -p 8080 (instead of SBA) and run the flask example which seeks for SBA at http://localhost:8080.