The issue is while((message = reader.readLine()) != null) loop doesn\'t end. I mean; lets say client didn\'t send anything, so while((message = reader.readLine(