Added default return if instance not in list.
This commit is contained in:
parent
f1e8fdeb50
commit
e7884aec26
@ -99,7 +99,7 @@ public class LibFreeRDP {
|
||||
if (mInstanceState.get(inst, false)) {
|
||||
freerdp_disconnect(inst);
|
||||
}
|
||||
while(mInstanceState.get(inst)) {
|
||||
while(mInstanceState.get(inst, false)) {
|
||||
try {
|
||||
mInstanceState.wait();
|
||||
} catch (InterruptedException e) {
|
||||
@ -121,7 +121,7 @@ public class LibFreeRDP {
|
||||
|
||||
public static boolean disconnect(long inst) {
|
||||
synchronized (mInstanceState) {
|
||||
if (mInstanceState.get(inst)) {
|
||||
if (mInstanceState.get(inst, false)) {
|
||||
return freerdp_disconnect(inst);
|
||||
}
|
||||
return true;
|
||||
@ -130,7 +130,7 @@ public class LibFreeRDP {
|
||||
|
||||
public static boolean cancelConnection(long inst) {
|
||||
synchronized (mInstanceState) {
|
||||
if (mInstanceState.get(inst)) {
|
||||
if (mInstanceState.get(inst, false)) {
|
||||
return freerdp_disconnect(inst);
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user