Fixed edge case with session connections and sending data on a publication that is not connected (either yet, or is an old one)

This commit is contained in:
Robinson 2023-10-23 23:24:57 +02:00
parent 01ab0bf1d8
commit 706cf5b3e8
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 6 additions and 1 deletions

View File

@ -907,7 +907,12 @@ class AeronDriver(config: Configuration, val logger: Logger, val endPoint: EndPo
listenerManager.notifyError(exception)
return false
}
else {
else if (connection.endPoint.sessionManager.enabled()) {
// if we are a SESSION, then the message will be placed into a queue to be re-sent once the connection comes back
// no extra actions required by us. Returning a "false" here makes sure that the session manager picks-up this message to
// re-broadcast (eventually) on the updated connection
return false
} else {
logger.info("[${publication.sessionId()}] Connection disconnected while sending data, closing connection.")
internal.mustRestartDriverOnError = true