Ports externalPorts = setupPortforwarding(future.internalAddress().getHostAddress(), peer
.connectionBean().channelServer().channelServerConfiguration().portsForwarding());
if (externalPorts != null) {
final PeerAddress serverAddressOrig = peer.peerBean().serverPeerAddress();
final PeerAddress serverAddress = serverAddressOrig
.changePorts(externalPorts.tcpPort(), externalPorts.udpPort())
.changeAddress(future.externalAddress());
//set the new address regardless wheter it will succeed or not.
// The discover will eventually check wheter the announced ip matches the one that it sees.
peer.peerBean().serverPeerAddress(serverAddress);