Throw exception if either bind or connect fails.