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()
|
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
|
// 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 {
|
endPoint.actionDispatch.launch {
|
||||||
// a connection might have also registered for disconnect events
|
// a connection might have also registered for disconnect events
|
||||||
|
@ -122,8 +122,7 @@ internal class RmiManagerConnections<CONNECTION: Connection>(logger: KLogger,
|
|||||||
connection.send(response)
|
connection.send(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
fun clearProxyObjects() {
|
||||||
proxyObjects.clear()
|
proxyObjects.clear()
|
||||||
super.close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,8 +205,7 @@ internal class RmiManagerGlobal<CONNECTION : Connection>(logger: KLogger,
|
|||||||
return success as T?
|
return success as T?
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
fun close() {
|
||||||
super.close()
|
|
||||||
rmiResponseManager.close()
|
rmiResponseManager.close()
|
||||||
remoteObjectCreationCallbacks.close()
|
remoteObjectCreationCallbacks.close()
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,4 @@ internal open class RmiObjectCache(logger: KLogger) {
|
|||||||
fun <T> removeImplObject(rmiId: Int): T? {
|
fun <T> removeImplObject(rmiId: Int): T? {
|
||||||
return implObjects.remove(rmiId) as T?
|
return implObjects.remove(rmiId) as T?
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun close() {
|
|
||||||
implObjects.close()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user