Added reason code 1000 to connection.close, closes now work.