diff --git a/.idea/.idea.Aaru/.idea/contentModel.xml b/.idea/.idea.Aaru/.idea/contentModel.xml index e7d12706b..d3d390d86 100644 --- a/.idea/.idea.Aaru/.idea/contentModel.xml +++ b/.idea/.idea.Aaru/.idea/contentModel.xml @@ -3,8 +3,7 @@ - - + diff --git a/.idea/.idea.Aaru/riderModule.iml b/.idea/.idea.Aaru/riderModule.iml index 211519d95..dda8120e0 100644 --- a/.idea/.idea.Aaru/riderModule.iml +++ b/.idea/.idea.Aaru/riderModule.iml @@ -8,7 +8,5 @@ - - \ No newline at end of file diff --git a/Aaru.Devices/Remote/Remote.cs b/Aaru.Devices/Remote/Remote.cs index 8485f012f..2fe6a2404 100644 --- a/Aaru.Devices/Remote/Remote.cs +++ b/Aaru.Devices/Remote/Remote.cs @@ -261,8 +261,15 @@ namespace Aaru.Devices.Remote public void Disconnect() { - _socket.Shutdown(SocketShutdown.Both); - _socket.Close(); + try + { + _socket.Shutdown(SocketShutdown.Both); + _socket.Close(); + } + catch(ObjectDisposedException) + { + // Ignore if already disposed + } } public DeviceInfo[] ListDevices() @@ -1415,7 +1422,14 @@ namespace Aaru.Devices.Remote byte[] buf = Marshal.StructureToByteArrayLittleEndian(cmdPkt); - _socket.Send(buf, SocketFlags.None); + try + { + _socket.Send(buf, SocketFlags.None); + } + catch(ObjectDisposedException) + { + // Ignore if already disposed + } } } } \ No newline at end of file