kill existing (if any) connection before creating a new one

This commit is contained in:
Michele Balistreri 2019-11-06 11:46:55 +03:00
parent fc451c142f
commit 24abd90bc4
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A

View File

@ -50,8 +50,9 @@ class SessionManager : ExportKeyCommand.Listener {
}
fun connect(uri: String) {
scope.launch {
session?.kill()
session = WCSession(
fromWCUri(uri),
MoshiPayloadAdapter(moshi),