Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/tuyanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-11-13 09:54:42 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-11-13 09:54:42 +0300
commitf02ea6d5655d9f5f7f3a3b855d6803c5b3eab987 (patch)
tree8f972e0fcce99c69577c5dfa9546512bd9ec56aa /TuyaDevice.cs
parent2b2f1480e69e4631b93b60254baecffbd61ebfc2 (diff)
Typo fix and C# version update
Diffstat (limited to 'TuyaDevice.cs')
-rw-r--r--TuyaDevice.cs8
1 files changed, 1 insertions, 7 deletions
diff --git a/TuyaDevice.cs b/TuyaDevice.cs
index d0d5c52..bd84ec1 100644
--- a/TuyaDevice.cs
+++ b/TuyaDevice.cs
@@ -147,13 +147,7 @@ namespace com.clusterrr.TuyaNet
await stream.WriteAsync(data, 0, data.Length).ConfigureAwait(false);
return await Receive(stream, nullRetries);
}
- catch (IOException ex)
- {
- // sockets sometimes drop the connection unexpectedly, so let's
- // retry at least once
- lastException = ex;
- }
- catch (TimeoutException ex)
+ catch (Exception ex) when (ex is IOException or TimeoutException)
{
// sockets sometimes drop the connection unexpectedly, so let's
// retry at least once