selecting on a ticker channel and accessing the resp object whilst the client Do method is working on it causes a race.
Easily reproduced.
The race exists between setting up the transfer and reading anything from it. As client.Do returns before resp.transfer has been fully set up, it can be read from 'too soon'.
In fact calling go resp.watchBps() also races with the transfer assignment.
selecting on a ticker channel and accessing the
resp
object whilst the client Do method is working on it causes a race.Easily reproduced.
The race exists between setting up the transfer and reading anything from it. As client.Do returns before
resp.transfer
has been fully set up, it can be read from 'too soon'.In fact calling
go resp.watchBps()
also races with the transfer assignment.(I will tal at a solution soon)