compat: cancel association of network events before close