diff --git a/src/SocketCANSharp/SafeFileDescriptorHandle.cs b/src/SocketCANSharp/SafeFileDescriptorHandle.cs index 0eea94c..9dd7258 100644 --- a/src/SocketCANSharp/SafeFileDescriptorHandle.cs +++ b/src/SocketCANSharp/SafeFileDescriptorHandle.cs @@ -53,7 +53,7 @@ public override bool IsInvalid { get { - return IsClosed || base.IsInvalid; + return IsClosed || base.IsInvalid || (int)handle.ToInt64() == -1; } }