diff --git a/S7.Net.UnitTest/S7NetTestsSync.cs b/S7.Net.UnitTest/S7NetTestsSync.cs
index 377506b..c84c1a7 100644
--- a/S7.Net.UnitTest/S7NetTestsSync.cs
+++ b/S7.Net.UnitTest/S7NetTestsSync.cs
@@ -933,7 +933,14 @@ namespace S7.Net.UnitTest
S7TestServer.Stop();
var unreachablePlc = new Plc(CpuType.S7300, "255.255.255.255", 0, 2);
- Assert.IsFalse(unreachablePlc.IsAvailable);
+ try
+ {
+ unreachablePlc.Open();
+ }
+ catch
+ {
+ }
+ Assert.IsFalse(unreachablePlc.IsConnected);
}
[TestMethod]
@@ -944,7 +951,8 @@ namespace S7.Net.UnitTest
S7TestServer.Start(TestServerPort);
var reachablePlc = CreatePlc();
- Assert.IsTrue(reachablePlc.IsAvailable);
+ reachablePlc.Open();
+ Assert.IsTrue(reachablePlc.IsConnected);
}
[TestMethod]
diff --git a/S7.Net/PLC.cs b/S7.Net/PLC.cs
index f3a497e..de8b646 100644
--- a/S7.Net/PLC.cs
+++ b/S7.Net/PLC.cs
@@ -75,26 +75,6 @@ namespace S7.Net
if (tcpClient != null) tcpClient.SendTimeout = writeTimeout;
}
}
-
- ///
- /// Returns true if a connection to the PLC can be established
- ///
- public bool IsAvailable
- {
- //TODO: Fix This
- get
- {
- try
- {
- OpenAsync().GetAwaiter().GetResult();
- return true;
- }
- catch
- {
- return false;
- }
- }
- }
///
/// Checks if the socket is connected and polls the other peer (the PLC) to see if it's connected.