Connection close fix