From 2bde8d4d68e56e45b13889e84bcd67c8a7762be4 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 17 Sep 2019 19:39:46 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Ext.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 1604ce6b..86e9e76e 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -1897,9 +1897,14 @@ namespace WebSocketSharp /// public static void Times (this long n, Action action) { - if (n > 0 && action != null) - for (long i = 0; i < n; i++) - action (i); + if (n <= 0) + return; + + if (action == null) + return; + + for (long i = 0; i < n; i++) + action (i); } ///