I have a thread that sits and reads objects off of an ObjectInputStream:
public void run() {
try {
ois = new ObjectInputStream(clientSocket.getInputStream());
Object o;
while ((o = ois.readObject()) != null) {
//do something with object
}
} catch (Exception ex) {
//Log exception
}
}
readObject does not throw InterruptedException and as far as I can tell, no exception is thrown when this thread is interrupted. How do I stop this thread?