1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Fix connection bug

TODO: We really should do something better about informing the user of
connection errors and the like.
This commit is contained in:
Daniel Barber 2020-01-17 14:11:33 -05:00
parent b581f297c9
commit de5d3e94fb
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -40,7 +40,9 @@ extension MPDClient {
let commandOperation = BlockOperation() { [unowned self] in
self.sendCommand(command: .connect, userData: ["host": host, "port": port])
self.idle()
if self.isConnected {
self.idle()
}
}
commandQueue.addOperation(commandOperation)
}