Manual merge fix for the connection stuff when switched to g++ from the 4.2.0 branch. TRQ-1425 was piggy-tailed to report this behavior.