|
From: Thomas J. <fa...@ap...> - 2002-11-05 22:33:17
|
Update of /var/lib/cvs/bWF2/src/de/bchat/net
In directory apollo:/tmp/cvs-serv30781
Modified Files:
bchatConnection.java
Log Message:
cancel waiting for connection closing after timeout
Index: bchatConnection.java
===================================================================
RCS file: /var/lib/cvs/bWF2/src/de/bchat/net/bchatConnection.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- bchatConnection.java 1 Nov 2002 20:14:36 -0000 1.3
+++ bchatConnection.java 5 Nov 2002 22:33:09 -0000 1.4
@@ -122,10 +122,16 @@
public void closeChatview() {
closeChatview = true;
+ int count = 0;
while(openChatview) {
try {
- log.debug("chatview closing requested, waiting for readloop to finish...");
- Thread.sleep(5000);
+ if(count++ > 5) {
+ log.error("tried to close chatview 5 times, but it refused to. bye-bye!");
+ return;
+ } else {
+ log.debug("chatview closing requested, waiting for readloop to finish...");
+ Thread.sleep(5000);
+ }
} catch (InterruptedException irex) {
log.error("Interrupted while waiting for chatview to close!");
}
|