Server connections are checked for isConnected() status during poll events

This commit is contained in:
Robinson 2023-08-11 10:02:57 -06:00
parent b39db65027
commit c856c23e3c
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ open class Server<CONNECTION : Connection>(
// this manages existing clients (for cleanup + connection polling). This has a concurrent iterator,
// so we can modify this as we go
connections.forEach { connection ->
if (!connection.isClosed()) {
if (!(connection.isClosed() || connection.isConnected()) ) {
// Otherwise, poll the connection for messages
pollCount += connection.poll()
} else {