code cleanup

This commit is contained in:
Robinson 2023-05-28 17:03:54 +02:00
parent 167de54114
commit cf875832d9
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -376,7 +376,8 @@ open class Server<CONNECTION : Connection>(
// finish closing -- this lets us make sure that we don't run into race conditions on the thread that calls close() // finish closing -- this lets us make sure that we don't run into race conditions on the thread that calls close()
try { try {
shutdownEventLatch.countDown() shutdownEventLatch.countDown()
} catch (ignored: Exception) {} } catch (ignored: Exception) {
}
} }
}) })
} }
@ -409,8 +410,10 @@ open class Server<CONNECTION : Connection>(
* *
* This function will be called for **only** network clients (IPC client are excluded) * This function will be called for **only** network clients (IPC client are excluded)
*/ */
fun filter(ipFilterRule: IpFilterRule) = runBlocking { fun filter(ipFilterRule: IpFilterRule) {
listenerManager.filter(ipFilterRule) runBlocking {
listenerManager.filter(ipFilterRule)
}
} }
/** /**
@ -431,8 +434,10 @@ open class Server<CONNECTION : Connection>(
* *
* This function will be called for **only** network clients (IPC client are excluded) * This function will be called for **only** network clients (IPC client are excluded)
*/ */
fun filter(function: CONNECTION.() -> Boolean) = runBlocking { fun filter(function: CONNECTION.() -> Boolean) {
listenerManager.filter(function) runBlocking {
listenerManager.filter(function)
}
} }
/** /**