[Tests] force the IP version to fix tests on bots. (#4805)
This commit is contained in:
Родитель
872ccd5a1d
Коммит
eeca0b8780
|
@ -42,6 +42,10 @@ namespace MonoTouchFixtures.Network {
|
|||
using (var parameters = NWParameters.CreateUdp ())
|
||||
using (var endpoint = NWEndpoint.Create (host, "80"))
|
||||
{
|
||||
using (var protocolStack = parameters.ProtocolStack) {
|
||||
var ipOptions = protocolStack.InternetProtocol;
|
||||
ipOptions.IPSetVersion (NWIPVersion.Version4);
|
||||
}
|
||||
connection = new NWConnection (endpoint, parameters);
|
||||
connection.SetQueue (DispatchQueue.DefaultGlobalQueue); // important, else we will get blocked
|
||||
connection.SetStateChangeHandler (ConnectionStateHandler);
|
||||
|
|
Загрузка…
Ссылка в новой задаче