mozilla-b2g/gaia — pull request #9835 by eric30 (2013-05-17 05:58:26+00:00)
Title: Bug 873352 - Stop discovering before pairing or connecting

Discovering devices is a heavy operation in Bluetooth. If we try to establish an outbound connection with discovering, it would not only extends the time to complete connection procedure, it may be even easier to cause connection failed.

In this patch, I change the order of stopping device discovery and pairing/connecting with a device.