This commit is contained in:
cdle
2023-06-06 20:14:51 +08:00
parent 10f300626a
commit e9a82789d8
4 changed files with 78 additions and 15 deletions
+7 -7
View File
@@ -67,13 +67,13 @@ var BotsLocker sync.RWMutex
var ErrNotFind = errors.New("adapter not find")
func DestroyAdapterByUUID(uuid string) {
BotsLocker.RLock()
defer BotsLocker.RUnlock()
for i := range Bots {
if Bots[i].uuid == uuid {
go Bots[i].Destroy()
}
}
// BotsLocker.RLock()
// defer BotsLocker.RUnlock()
// for i := range Bots {
// if Bots[i].uuid == uuid {
// go Bots[i].Destroy()
// }
// }
}
func GetAdapter(botplt string, bots_id ...string) (*Factory, error) {