Washington (CNN) Legislation to prevent the government from shutting down failed Friday night in the Senate ahead of the midnight deadline. The total on the procedural motion was 50-49, but 60 votes were needed to advance the bill.