show reason in error message

This commit is contained in:
Daniel Gultsch 2019-10-05 22:14:38 +02:00
parent 01fc78d2a5
commit 6155938623
1 changed files with 6 additions and 1 deletions

View File

@ -232,7 +232,12 @@ public class JingleConnection implements Transferable {
} else if (reason.hasChild("success")) { } else if (reason.hasChild("success")) {
this.receiveSuccess(); this.receiveSuccess();
} else { } else {
this.fail(reason.getName()); final List<Element> children = reason.getChildren();
if (children.size() == 1) {
this.fail(children.get(0).getName());
} else {
this.fail();
}
} }
} else { } else {
this.fail(); this.fail();