Connection handling improvement

Jira Issue: WP-1024