added catch to confirm done always releases a semaphore, also fixed edge case where a connection could be made even if at max connection limit