[Tests] force the IP version to fix tests on bots. (#4805)

This commit is contained in:
Manuel de la Pena 2018-09-13 20:13:21 +02:00 коммит произвёл Sebastien Pouliot
Родитель 872ccd5a1d
Коммит eeca0b8780
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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);