title: Getting "[CDS] shutdownInput in read" in logCat
body: <p>I have an android application which I am developing and at a certain stage I am getting</p>
  
  <p><code>" [CDS]shutdownInput in read "</code> continuously in my Log Viewer?</p>
  
  <p>What is this entail and what am I doing wrong to cause this message to appear?</p>
  
  <p>I have a thread checking the in stream.</p>
  
  <pre><code>Thread thread = new Thread(new Runnable() {
          public void run() {
              while (true) {
                  mySocket.ReadFromSocket();
                  try {
                      Thread.sleep(500);
                  } catch (InterruptedException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
              }
          }
  
  
  public byte[] ReadFromSocket() throws IOException {
      if (socketState == SocketState.CONNECTED) {
          byte[] buffer = new byte[1024];
          int noOfBytesRead = nis.read(buffer, 0, 1024); // This is blocking
          while (noOfBytesRead == -1) {
              noOfBytesRead = nis.read(buffer, 0, 1024); // This is blocking
              try {
                  Thread.sleep(50);
              } catch (InterruptedException e) {
              }
          }
          byte[] tempdata = new byte[noOfBytesRead];
          System.arraycopy(buffer, 0, tempdata, 0, noOfBytesRead);
          return tempdata;
      } else {
          throw new IOException("Socket Not Connected");
      }
  }
  </code></pre>