Skip to content

Commit

Permalink
nichts nennenswertes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaLa-HAW committed Nov 14, 2017
1 parent effdf27 commit 60a4508
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
54 changes: 35 additions & 19 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified out/production/ChatSystem/Server/AccountHandler.class
Binary file not shown.
7 changes: 3 additions & 4 deletions src/Server/AccountHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void run() {
write();
try {
int available = input.available();
while (available != 0) {
while (available != 0 && running) {
available = input.available();
byte[] bytes = new byte[available];
input.read(bytes);
Expand Down Expand Up @@ -178,7 +178,6 @@ private void processMessage(String s) {
sendData(commands);
break;
case "$DISCONNECT":
sendToChatroom(s);
close();
break;
case "$USERLIST": // username = ipaddress ....
Expand Down Expand Up @@ -280,10 +279,10 @@ private synchronized void close() {
return;
}
setRunning(false);
for (int i = 0; i < chatrooms.size(); i++) {
/*for (int i = 0; i < chatrooms.size(); i++) {
chatrooms.get(i).sendToAll(Server.NAME + Server.getTime() + name + " has disconnected." + chatrooms.get(i).name());
chatrooms.get(i).removeUser(name);
}
}*/
try {
System.out.println("Closing socket to " + name);
output.close();
Expand Down

0 comments on commit 60a4508

Please sign in to comment.