Skip to content

Conversation

Ostrenkiy
Copy link
Contributor

Коротко для Release Notes, в формате «Сделали/Добавили/Исправили N»:
Исправили race condition в performRequest

Описание:
Добавил диспатч в отдельную очередь и семафоры на проверку токена на валидность.
Возникает проблема, если сразу попытаться рефрешнуть контроллер: несколько CourseList-ов на одном экране пытались одновременно асинхронно рефрешнуть токен и чуда не происходило.

@Ostrenkiy Ostrenkiy added this to the 1.46 milestone Nov 1, 2017
@Ostrenkiy Ostrenkiy self-assigned this Nov 1, 2017
@Ostrenkiy Ostrenkiy requested a review from kvld November 1, 2017 18:09

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

// let token = StepicToken(accessToken: "q0FPaRDvITg0DiltK98zvbMhsORUBc", refreshToken: "G5G98oDqA4HiiME74xQLtz4KINCaFV", tokenType: "Bearer", expireDate: Date(timeIntervalSince1970: 1509532200))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что это за токены в коде? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ауч, больно

@Ostrenkiy Ostrenkiy merged commit fc77993 into dev Nov 1, 2017
@Ostrenkiy Ostrenkiy deleted the feature/perform-request-concurrency branch November 1, 2017 19:32
@Ostrenkiy Ostrenkiy mentioned this pull request Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants