mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Because of the well-known range loop closure issue, the value of u may have changed by the time the anonymous function mentioned in the defer is run. To address this, the simplest fix is to pass the url used in the loop as an argument to the function run in defer.