Fix socket map maintenance