From cf875832d9adbb77ff5ba4c9b264b863e09149c7 Mon Sep 17 00:00:00 2001 From: Robinson Date: Sun, 28 May 2023 17:03:54 +0200 Subject: [PATCH] code cleanup --- src/dorkbox/network/Server.kt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/dorkbox/network/Server.kt b/src/dorkbox/network/Server.kt index 1e884533..59b81de0 100644 --- a/src/dorkbox/network/Server.kt +++ b/src/dorkbox/network/Server.kt @@ -376,7 +376,8 @@ open class Server( // finish closing -- this lets us make sure that we don't run into race conditions on the thread that calls close() try { shutdownEventLatch.countDown() - } catch (ignored: Exception) {} + } catch (ignored: Exception) { + } } }) } @@ -409,8 +410,10 @@ open class Server( * * This function will be called for **only** network clients (IPC client are excluded) */ - fun filter(ipFilterRule: IpFilterRule) = runBlocking { - listenerManager.filter(ipFilterRule) + fun filter(ipFilterRule: IpFilterRule) { + runBlocking { + listenerManager.filter(ipFilterRule) + } } /** @@ -431,8 +434,10 @@ open class Server( * * This function will be called for **only** network clients (IPC client are excluded) */ - fun filter(function: CONNECTION.() -> Boolean) = runBlocking { - listenerManager.filter(function) + fun filter(function: CONNECTION.() -> Boolean) { + runBlocking { + listenerManager.filter(function) + } } /**