[freenet-cvs] r13430 - trunk/freenet/src/freenet/io/comm

toad at freenetproject.org toad at freenetproject.org
Fri Jun 1 09:16:35 UTC 2007


Author: toad
Date: 2007-06-01 09:16:34 +0000 (Fri, 01 Jun 2007)
New Revision: 13430

Modified:
   trunk/freenet/src/freenet/io/comm/UdpSocketManager.java
Log:
Fix NPE

Modified: trunk/freenet/src/freenet/io/comm/UdpSocketManager.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/UdpSocketManager.java	2007-06-01 05:39:37 UTC (rev 13429)
+++ trunk/freenet/src/freenet/io/comm/UdpSocketManager.java	2007-06-01 09:16:34 UTC (rev 13430)
@@ -370,16 +370,15 @@
 					matched = true;
 					i.remove();
 					match = f;
-					synchronized (f) {
-						f.notifyAll();
-					}
 					if(logMINOR) Logger.minor(this, "Matched: "+f);
 					break; // Only one match permitted per message
 				}
 			}
 		}
-		match.setMessage(m);
-		match.onMatched();
+		if(match != null) {
+			match.setMessage(m);
+			match.onMatched();
+		}
 		// Feed unmatched messages to the dispatcher
 		if ((!matched) && (_dispatcher != null)) {
 		    try {




More information about the cvs mailing list