mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
improve doc for dataprovider Close method
the method is used in test cases, it assumes that the dataprovider is initialized and it is not safe Initialize/Close from different goroutines
This commit is contained in:
@@ -259,7 +259,9 @@ func GetUserByID(p Provider, ID int64) (User, error) {
|
||||
return p.getUserByID(ID)
|
||||
}
|
||||
|
||||
// Close releases all database resources
|
||||
// Close releases all provider resources.
|
||||
// This method is used in test cases.
|
||||
// Closing an uninitialized provider is not supported
|
||||
func Close(p Provider) error {
|
||||
availabilityTicker.Stop()
|
||||
availabilityTickerDone <- true
|
||||
|
||||
Reference in New Issue
Block a user