private void waitForDeRegisterResponseMessage() throws Exception {
final Message response = this.messageReader.readSTUNMessage(this.controlConnection.getInputStream());
if (response.isSuccessResponse()) {
this.logger.debug("Target successfully (de)registered"); //$NON-NLS-1$
} else {
final ErrorCode errorCode = response.getAttribute(ErrorCode.class);
final String errorMessage = "Could not (de)register target: " + errorCode.getErrorNumber() + " " + errorCode.getReasonPhrase(); //$NON-NLS-1$ //$NON-NLS-2$
throw new Exception(errorMessage);
}
}