Fix the Pool constructor to accept the 'endpoint' argument