Make pb connect timeout configurable

Patch for issue #3978