do not throw when finishing jingle ft twice. fixes #3765
the state machine in jingle file transfer does not prevent that the connection is being finished twice
This commit is contained in:
parent
b78d45c7cc
commit
1853242c66
|
@ -447,6 +447,10 @@ public class JingleConnectionManager extends AbstractConnectionManager {
|
|||
}
|
||||
|
||||
void finishConnection(final AbstractJingleConnection connection) {
|
||||
this.connections.remove(connection.getId());
|
||||
}
|
||||
|
||||
void finishConnectionOrThrow(final AbstractJingleConnection connection) {
|
||||
final AbstractJingleConnection.Id id = connection.getId();
|
||||
if (this.connections.remove(id) == null) {
|
||||
throw new IllegalStateException(String.format("Unable to finish connection with id=%s", id.toString()));
|
||||
|
|
|
@ -1189,7 +1189,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
if (isTerminated()) {
|
||||
this.cancelRingingTimeout();
|
||||
this.webRTCWrapper.verifyClosed();
|
||||
this.jingleConnectionManager.finishConnection(this);
|
||||
this.jingleConnectionManager.finishConnectionOrThrow(this);
|
||||
} else {
|
||||
throw new IllegalStateException(String.format("Unable to call finish from %s", this.state));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue