This example demonstrates how you can immediately disconnect from wifi (you'll need to do a cold boot to reconnect) and continue running code.