equal
deleted
inserted
replaced
709 remoteAddress = sa; |
709 remoteAddress = sa; |
710 sender = isa; |
710 sender = isa; |
711 cachedSenderInetAddress = isa.getAddress(); |
711 cachedSenderInetAddress = isa.getAddress(); |
712 cachedSenderPort = isa.getPort(); |
712 cachedSenderPort = isa.getPort(); |
713 |
713 |
714 // Socket was not bound before connecting, |
714 // set or refresh local address |
715 if (localAddress == null) { |
715 localAddress = Net.localAddress(fd); |
716 localAddress = Net.localAddress(fd); |
|
717 } |
|
718 } |
716 } |
719 } |
717 } |
720 } |
718 } |
721 return this; |
719 return this; |
722 } |
720 } |
733 sm.checkConnect(isa.getAddress().getHostAddress(), |
731 sm.checkConnect(isa.getAddress().getHostAddress(), |
734 isa.getPort()); |
732 isa.getPort()); |
735 disconnect0(fd); |
733 disconnect0(fd); |
736 remoteAddress = null; |
734 remoteAddress = null; |
737 state = ST_UNCONNECTED; |
735 state = ST_UNCONNECTED; |
|
736 |
|
737 // refresh local address |
|
738 localAddress = Net.localAddress(fd); |
738 } |
739 } |
739 } |
740 } |
740 } |
741 } |
741 return this; |
742 return this; |
742 } |
743 } |