mirror of https://github.com/apache/activemq.git
Try initializing the replicated leveldb response_callbacks early on to avoid potential NPE.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1484049 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f20e17ae32
commit
57617b862f
|
@ -184,6 +184,8 @@ class SlaveLevelDBStore extends LevelDBStore with ReplicatedLevelDBStoreTrait {
|
||||||
|
|
||||||
class Session(transport:Transport, on_login: (Session)=>Unit) extends TransportHandler(transport) {
|
class Session(transport:Transport, on_login: (Session)=>Unit) extends TransportHandler(transport) {
|
||||||
|
|
||||||
|
val response_callbacks = new util.LinkedList[(ReplicationFrame)=>Unit]()
|
||||||
|
|
||||||
override def onTransportFailure(error: IOException) {
|
override def onTransportFailure(error: IOException) {
|
||||||
if( isStarted ) {
|
if( isStarted ) {
|
||||||
warn("Unexpected session error: "+error)
|
warn("Unexpected session error: "+error)
|
||||||
|
@ -237,7 +239,7 @@ class SlaveLevelDBStore extends LevelDBStore with ReplicatedLevelDBStoreTrait {
|
||||||
response_callbacks.addLast(cb)
|
response_callbacks.addLast(cb)
|
||||||
send(action, body)
|
send(action, body)
|
||||||
}
|
}
|
||||||
val response_callbacks = new util.LinkedList[(ReplicationFrame)=>Unit]()
|
|
||||||
def response_handler: (AnyRef)=>Unit = (command)=> {
|
def response_handler: (AnyRef)=>Unit = (command)=> {
|
||||||
command match {
|
command match {
|
||||||
case command:ReplicationFrame =>
|
case command:ReplicationFrame =>
|
||||||
|
|
Loading…
Reference in New Issue