cjones found me on IRC today and mentioned that currently B2G doesn't shut down cleanly because during shutdown, workers try to join all of the threads, but wifi has a thread stuck waiting for messages from wpa_supplicant.
Created attachment 607531 [details] [diff] [review] Possible fix Chris, I haven't been able to reproduce the shutdown hang, but this *should* fix it. Can you let me know if this helps?
Comment on attachment 607531 [details] [diff] [review] Possible fix I'll give this a shot, but not confident it'll solve the problem in general.
Oh, I should have mentioned. The shutdown method added to nsIWifi and called here (but seemingly not added in the patch) already existed in WifiWorker.js and it calls WifiManager.setEnabled(false). This has the effect of telling the wpa_supplicant to shut down, unblocking the shutdown process.
Comment on attachment 607531 [details] [diff] [review] Possible fix WFM!