Fixed issue clearing RMI proxy objects on connection close
This commit is contained in:
parent
42664bfdfe
commit
a464d4b231
@ -301,6 +301,8 @@ open class Connection(connectionParameters: ConnectionParams<*>) {
|
||||
|
||||
publication.close()
|
||||
|
||||
rmiConnectionSupport.clearProxyObjects()
|
||||
|
||||
// this always has to be on a new dispatch, otherwise we can have weird logic loops if we reconnect within a disconnect callback
|
||||
endPoint.actionDispatch.launch {
|
||||
// a connection might have also registered for disconnect events
|
||||
|
@ -122,8 +122,7 @@ internal class RmiManagerConnections<CONNECTION: Connection>(logger: KLogger,
|
||||
connection.send(response)
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
fun clearProxyObjects() {
|
||||
proxyObjects.clear()
|
||||
super.close()
|
||||
}
|
||||
}
|
||||
|
@ -205,8 +205,7 @@ internal class RmiManagerGlobal<CONNECTION : Connection>(logger: KLogger,
|
||||
return success as T?
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
super.close()
|
||||
fun close() {
|
||||
rmiResponseManager.close()
|
||||
remoteObjectCreationCallbacks.close()
|
||||
}
|
||||
|
@ -43,8 +43,4 @@ internal open class RmiObjectCache(logger: KLogger) {
|
||||
fun <T> removeImplObject(rmiId: Int): T? {
|
||||
return implObjects.remove(rmiId) as T?
|
||||
}
|
||||
|
||||
open fun close() {
|
||||
implObjects.close()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user