lhotari commented on a change in pull request #14078:
URL: https://github.com/apache/pulsar/pull/14078#discussion_r795719026
##########
File path:
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java
##########
@@ -316,6 +322,7 @@ protected void messageReceived() {
@Override
protected void handleConnected(CommandConnected connected) {
+ checkArgument(state == BackendState.Init, "Unexpected state %s.
BackendState.Init was expected.", state);
Review comment:
a similar approach is used in the ProxyConnection class.
https://github.com/apache/pulsar/blob/c51856a699edfecc0850586befb897405a0ca9ca/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java#L304
the `exceptionCaught` method takes care of closing the channel when any
uncaught exception happens.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]