Author: david.lloyd(a)jboss.com
Date: 2008-07-19 01:39:55 -0400 (Sat, 19 Jul 2008)
New Revision: 4412
Modified:
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
Log:
Fix service registry handle leak (minor correction)
Modified:
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
===================================================================
---
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-07-19
05:38:50 UTC (rev 4411)
+++
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-07-19
05:39:55 UTC (rev 4412)
@@ -256,11 +256,11 @@
final int serviceId = buffer.getInt();
final int clientId = buffer.getInt();
final Handle<RemoteServiceEndpoint> handle =
registry.lookup(serviceId);
+ if (handle == null) {
+ log.warn("Received client open message for unknown service
%d", Integer.valueOf(serviceId));
+ break;
+ }
try {
- if (handle == null) {
- log.warn("Received client open message for unknown
service %d", Integer.valueOf(serviceId));
- break;
- }
final RemoteServiceEndpoint serviceEndpoint =
handle.getResource();
final Handle<RemoteClientEndpoint> clientHandle =
serviceEndpoint.createClientEndpoint();
// todo check for duplicate
Show replies by date