When using new network, the tests use an IPv6-based localhost address for binding and connecting.
The local socket is opened in setUp
:
setUp
listenerSocket := Socket newTCP listenOn: self listenerPort backlogSize: 4 interface: self listenerAddress.
The listenerAddress
is derived as follows:
^ NetNameResolver addressForName: 'localhost'
In oldNetwork
, that's an IPv4, in !oldNetwork
that's an IPv6. this is good
However, the Socket is created as newTCP
, that is, explicitely IPv4:
newTCP
"Create a socket and initialise it for TCP"
^self newTCP: SocketAddressInformation addressFamilyINET4
This is bad. This is where the Error message comes from.
This should be changed to use the address familty that fits best to the current old/new-network.
On top of that, #listenOn:backlogSize: interface:
solely deals with IPv4 adresses.
The correct way is to use the indirection of SocketAddressInformation
in #listenWithBacklog:
.
This deals correctly with the address family.
Things to do:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.