maybe fix crash when setup settings and reconnect bt client

This commit is contained in:
YouROK
2020-12-22 16:23:52 +03:00
parent 29031b935e
commit 6f07e85b5a
2 changed files with 8 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ func (bt *BTServer) Disconnect() {
defer bt.mu.Unlock()
if bt.client != nil {
bt.client.Close()
InitApiHelper(nil)
bt.client = nil
utils.FreeOSMemGC()
}