hey As part of a project ive had to write a small IRC client to embed in it. Everything works nicely until the program is closed and the thread that reads input from the IRC channel is waiting for more input and never dies.
while(((inBuffer=in.readLine())!=null)&&(die==false))
inBuffer is simply a string and in is a buffered reader on the socket.
the die variable is a boolean and my thought was that i can set that to true and it will fall out the thread. The problem is that "inBuffer=in.readLine()" is sitting there until it gets another line.
Can someone give me a hand?
Close the in
stream, readLine()
should then return null
instantly.