Previously when Authenticate() or Authenticated() was called simultaneously from several goroutines authLock was initialized in racy manner. Such code is not allowed by Go Memory Model and sometimes crashes.
2. Introduce GetStorageUrl() method
Access to StorageUrl without taking authLock is racy. New method GetStorageUrl() is added for getting StorageLock in race-free manner. Methods where StorageUrl was accessed without lock (QueryInfo() and ObjectTempUrl()) are updated.
1. Allocate authLock as part of Connection
Previously when Authenticate() or Authenticated() was called simultaneously from several goroutines authLock was initialized in racy manner. Such code is not allowed by Go Memory Model and sometimes crashes.
2. Introduce GetStorageUrl() method
Access to StorageUrl without taking authLock is racy. New method GetStorageUrl() is added for getting StorageLock in race-free manner. Methods where StorageUrl was accessed without lock (QueryInfo() and ObjectTempUrl()) are updated.