Update global cost_factors on thd disconnect