Adding the origin address to the SHUTDOWN CommandType when sent and also removed a wasteful FIXME
This commit is contained in:
parent
e3fe09f9bd
commit
b42c6b6bd1
1 changed files with 6 additions and 2 deletions
|
|
@ -517,6 +517,10 @@ class NettyRemoteServer(val remoteSupport: NettyRemoteSupport, val loader: Optio
|
|||
try {
|
||||
val shutdownSignal = {
|
||||
val b = RemoteControlProtocol.newBuilder.setCommandType(CommandType.SHUTDOWN)
|
||||
b.setOrigin(RemoteProtocol.AddressProtocol.newBuilder
|
||||
.setHostname(address.hostname)
|
||||
.setPort(address.port)
|
||||
.build)
|
||||
if (SecureCookie.nonEmpty)
|
||||
b.setCookie(SecureCookie.get)
|
||||
b.build
|
||||
|
|
@ -646,8 +650,8 @@ class RemoteServerHandler(
|
|||
val inbound = RemoteAddress(origin.getHostname, origin.getPort)
|
||||
val client = new PassiveRemoteClient(event.getChannel, remoteSupport, inbound)
|
||||
remoteSupport.bindClient(inbound, client)
|
||||
case CommandType.SHUTDOWN ⇒ //TODO FIXME Dispose passive connection here
|
||||
case _ ⇒ //Unknown command
|
||||
case CommandType.SHUTDOWN ⇒ //No need to do anything here
|
||||
case _ ⇒ //Unknown command
|
||||
}
|
||||
case _ ⇒ //ignore
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue