added persist mode support to custom blocking connection.