Only log EPP and WHIOS connections

Only connections that have backend are of interest to us. Move the logging
statement accordingly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208898433
This commit is contained in:
jianglai 2018-08-15 15:54:44 -07:00
parent fc75e08061
commit 8a1c99e22b

View file

@ -93,13 +93,14 @@ public class ProxyServer implements Runnable {
inboundChannel.attr(PROTOCOL_KEY).set(inboundProtocol);
inboundChannel.attr(RELAY_BUFFER_KEY).set(new ArrayDeque<>());
addHandlers(inboundChannel.pipeline(), inboundProtocol.handlerProviders());
logger.atInfo().log("Connection established: %s %s", inboundProtocol.name(), inboundChannel);
if (!inboundProtocol.hasBackend()) {
// If the frontend has no backend to relay to (health check, web WHOIS redirect, etc), start
// reading immediately.
inboundChannel.config().setAutoRead(true);
} else {
logger.atInfo().log(
"Connection established: %s %s", inboundProtocol.name(), inboundChannel);
// Connect to the relay (outbound) channel specified by the BackendProtocol.
BackendProtocol outboundProtocol = inboundProtocol.relayProtocol();
Bootstrap bootstrap =