Revision: 604e8e9c9184
Author: Alexandre Mendonça <ammendonca>
Date: Thu Aug 21 01:14:45 2014 UTC
Log: Issue 56: Client cannot reconnect after missing few DWA
Added timeout to selector.select() so that it checks for stop
periodically:wq
Fixes Issue 56
http://code.google.com/p/jdiameter/source/detail?r=604e8e9c9184
Modified:
/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java
=======================================
---
/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java
Fri Aug 1 00:31:10 2014 UTC
+++
/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/transport/tcp/TCPTransportClient.java
Thu Aug 21 01:14:45 2014 UTC
@@ -99,6 +99,7 @@
//PCB - allow non blocking IO
private static final boolean BLOCKING_IO = false;
+ private static final long SELECT_TIMEOUT = 500; // milliseconds
public TCPTransportClient() {
}
@@ -190,7 +191,7 @@
selector = Selector.open();
socketChannel.register(selector, SelectionKey.OP_READ);
while (!stop) {
- selector.select();
+ selector.select(SELECT_TIMEOUT);
Iterator<SelectionKey> it = selector.selectedKeys().iterator();
while (it.hasNext()) {
// Get the selection key
--
---
You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.