We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: A simple, asynchronous, single-threaded memcached client written in java.
Homepage: http://code.google.com/p/spymemcached/
Clone URL: git://github.com/dustin/java-memcached-client.git
  Reconnect if an IOException occurs during handleOperation()
dustin (author)
Sat Mar 31 18:47:52 -0700 2007
commit  6683bf2ee081519cf319e9149007a5158b95545f
tree    6e246becc46f0fb22b160785da4dc40a5ffb9f97
parent  e1837b53d7c26034aa9ae1904184694ff2b67f2c
...
206
207
208
209
 
 
 
 
 
 
 
210
211
212
...
206
207
208
 
209
210
211
212
213
214
215
216
217
218
0
@@ -206,7 +206,13 @@ public class MemcachedConnection extends SpyObject {
0
     } else {
0
       Operation currentOp=qa.ops.peek();
0
       if(currentOp != null) {
0
- handleOperation(currentOp, sk, qa);
0
+ try {
0
+ handleOperation(currentOp, sk, qa);
0
+ } catch(IOException e) {
0
+ getLogger().warn("Exception handling %s, reconnecting",
0
+ currentOp, e);
0
+ queueReconnect(qa);
0
+ }
0
       } else {
0
         if(sk.isReadable()) {
0
           ByteBuffer b=ByteBuffer.allocate(1);

Comments

    No one has commented yet.