<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -293,6 +293,10 @@ public final class MemcachedConnection extends SpyObject {
 		ByteBuffer rbuf=qa.getRbuf();
 		final SocketChannel channel = qa.getChannel();
 		int read=channel.read(rbuf);
+		if (read &lt; 0) {
+		    // GRUMBLE.
+		    throw new IOException(&quot;Disconnected&quot;);
+		}
 		while(read &gt; 0) {
 			getLogger().debug(&quot;Read %d bytes&quot;, read);
 			rbuf.flip();</diff>
      <filename>src/main/java/net/spy/memcached/MemcachedConnection.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>255d13bdb16e66175c58bf16a15010555e3dced7</id>
    </parent>
  </parents>
  <author>
    <name>Robey Pointer</name>
    <email>robey@twitter.com</email>
  </author>
  <url>http://github.com/dustin/java-memcached-client/commit/c7213d018047b6a17cfac88953e7cacf9ab48b10</url>
  <id>c7213d018047b6a17cfac88953e7cacf9ab48b10</id>
  <committed-date>2008-10-02T21:49:30-07:00</committed-date>
  <authored-date>2008-07-21T16:48:51-07:00</authored-date>
  <message>if the memcache server disconnects, try to notice.</message>
  <tree>ba9954495da439d46e78f518eb438f30c6695d24</tree>
  <committer>
    <name>Dustin Sallings</name>
    <email>dustin@spy.net</email>
  </committer>
</commit>
