fix bugs
This commit is contained in:
@@ -73,6 +73,7 @@ public class ClientSession implements Runnable {
|
|||||||
// 6. Otherwise, create the user's folders with FileManager.createUserFolders(...)
|
// 6. Otherwise, create the user's folders with FileManager.createUserFolders(...)
|
||||||
// and send back LOGIN_SUCCESS.
|
// and send back LOGIN_SUCCESS.
|
||||||
this.username = requestedUser;
|
this.username = requestedUser;
|
||||||
|
FileManager.createUserFolders(username);
|
||||||
out.writeObject(new ChatMessage(MessageType.LOGIN_SUCCESS, "Server", null, "Welcome "+username));
|
out.writeObject(new ChatMessage(MessageType.LOGIN_SUCCESS, "Server", null, "Welcome "+username));
|
||||||
out.flush();
|
out.flush();
|
||||||
System.out.println("User logged in: "+username);
|
System.out.println("User logged in: "+username);
|
||||||
|
|||||||
Reference in New Issue
Block a user