Fixed issue #40
This commit is contained in:
@@ -667,11 +667,15 @@ class ProtocolProcessor implements EventHandler<ValueEvent> {
|
||||
}
|
||||
|
||||
public void onEvent(ValueEvent t, long l, boolean bln) throws Exception {
|
||||
MessagingEvent evt = t.getEvent();
|
||||
//It's always of type OutputMessagingEvent
|
||||
OutputMessagingEvent outEvent = (OutputMessagingEvent) evt;
|
||||
LOG.debug("Output event, sending {}", outEvent.getMessage());
|
||||
outEvent.getChannel().write(outEvent.getMessage());
|
||||
try {
|
||||
MessagingEvent evt = t.getEvent();
|
||||
//It's always of type OutputMessagingEvent
|
||||
OutputMessagingEvent outEvent = (OutputMessagingEvent) evt;
|
||||
LOG.debug("Output event, sending {}", outEvent.getMessage());
|
||||
outEvent.getChannel().write(outEvent.getMessage());
|
||||
} finally {
|
||||
t.setEvent(null); //free the reference to all Netty stuff
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -153,6 +153,7 @@ public class SimpleMessaging implements IMessaging, EventHandler<ValueEvent> {
|
||||
@Override
|
||||
public void onEvent(ValueEvent t, long l, boolean bln) throws Exception {
|
||||
MessagingEvent evt = t.getEvent();
|
||||
t.setEvent(null); //free the reference to all Netty stuff
|
||||
LOG.info("onEvent processing messaging event from input ringbuffer {}", evt);
|
||||
if (evt instanceof StopEvent) {
|
||||
processStop();
|
||||
|
||||
Reference in New Issue
Block a user