cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1390669 - /cxf/trunk/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
Date Wed, 26 Sep 2012 18:57:27 GMT
Author: dkulp
Date: Wed Sep 26 18:57:27 2012
New Revision: 1390669

URL: http://svn.apache.org/viewvc?rev=1390669&view=rev
Log:
Allow property to be set as a String (example: in configs)

Modified:
    cxf/trunk/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java

Modified: cxf/trunk/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java?rev=1390669&r1=1390668&r2=1390669&view=diff
==============================================================================
--- cxf/trunk/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
(original)
+++ cxf/trunk/rt/transports/udp/src/main/java/org/apache/cxf/transport/udp/UDPConduit.java
Wed Sep 26 18:57:27 2012
@@ -270,8 +270,14 @@ public class UDPConduit extends Abstract
             if (!message.getExchange().isOneWay()) {
                 byte bytes[] = new byte[64 * 1024];
                 DatagramPacket p = new DatagramPacket(bytes, bytes.length);
-                Integer i = (Integer)message.getContextualProperty(MULTI_RESPONSE_TIMEOUT);
-                if (i == null || message.getExchange().isSynchronous()) {
+                Object to = message.getContextualProperty(MULTI_RESPONSE_TIMEOUT);
+                Integer i = null;
+                if (to instanceof String) {
+                    i = Integer.parseInt((String)to);
+                } else if (to instanceof Integer) {
+                    i = (Integer)to;
+                }
+                if (i == null || i <= 0 || message.getExchange().isSynchronous()) {
                     socket.setSoTimeout(30000);
                     socket.receive(p);
                     dataReceived(message, IoBuffer.wrap(bytes, 0, p.getLength()), false);



Mime
View raw message