Skip to content

Commit

Permalink
fix: 处理请求时增加空请求类型处理逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Jul 22, 2024
1 parent b53e146 commit 6b3624b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/cc/baka9/catseedlogin/bukkit/Communication.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ private static void socketServerStart() {
private static void handleRequest(Socket socket) throws IOException {
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {
String requestType = bufferedReader.readLine();
if (requestType == null) {
socket.close();
return;
}
String playerName = bufferedReader.readLine();
switch (requestType) {
case "Connect":
Expand Down

0 comments on commit 6b3624b

Please sign in to comment.