Modified Race Condition Issue of Connection