Returns the first working connection based on is_working flag.
The first working connection, or null if no working connection is found