From d5612717a2d343d4cfdad47336c61e30f9480f3e Mon Sep 17 00:00:00 2001 From: mdb Date: Sun, 10 Jun 2001 21:32:48 +0000 Subject: [PATCH] Throw EOFException if CDDB server closes their end of the connection during a lookup. git-svn-id: https://samskivert.googlecode.com/svn/trunk@155 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../samskivert/src/java/com/samskivert/net/cddb/CDDB.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java b/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java index 548796b5..650365e6 100644 --- a/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java +++ b/projects/samskivert/src/java/com/samskivert/net/cddb/CDDB.java @@ -1,5 +1,5 @@ // -// $Id: CDDB.java,v 1.5 2001/03/03 21:19:05 mdb Exp $ +// $Id: CDDB.java,v 1.6 2001/06/10 21:32:48 mdb Exp $ package com.samskivert.net.cddb; @@ -449,6 +449,10 @@ public class CDDB // now read the response String rspstr = _in.readLine(); + // if they closed the connection on us, we should deal + if (rspstr == null) { + throw new EOFException(); + } System.err.println("RSP:" + rspstr); // parse the response @@ -479,7 +483,7 @@ public class CDDB */ static { - StringTokenizer tok = new StringTokenizer("$Revision: 1.5 $"); + StringTokenizer tok = new StringTokenizer("$Revision: 1.6 $"); tok.nextToken(); CLIENT_VERSION = tok.nextToken(); }