Fixed issue #40

This commit is contained in:
andrea
2015-06-07 17:57:42 +02:00
parent 3f4a5586de
commit e699d5ff2b
3 changed files with 11 additions and 5 deletions
+1
View File
@@ -14,6 +14,7 @@ Version 0.7:
Modified the password_file format to use password stored in sha256 and not plain text
Added ACL file for topic read|write operations.
Removed cause of leakage of Netty Sessions (fix issue #39)
Cleaned Netty's stuff reference from Events used in Disruptor (fix issue #40)
Version 0.6:
Fix issue #42, bad password file path composition
@@ -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();