Comment 2 for bug 708046

Omry Yadan (omry) wrote :

for reference, second if is the fix:

            int bytesRead = serverConnection.read(bytesReceived);
            if (bytesRead >= 0) {
                  ...
            }
            else
            if (bytesRead == -1){
         if (isOpen())
             close();
                //TODO do something smarter here
                throw new IOException("Connection to job server severed");
            }