Peers may have nil endpoints, a case which must be gracefully handled. Signed-off-by: Lucas Servén Marín <lserven@gmail.com>