h2non/gock

Race condition in mock.go file

Halfi opened this issue · 0 comments

Halfi commented

Hello! In rare case it could produce race condition with disabled field in Mocker struct.

It could case when decrement() (https://github.com/h2non/gock/blob/v1.1.1/mock.go#L144) and Disabled() (https://github.com/h2non/gock/blob/v1.1.1/mock.go#L67) called in same time.