b254107
Branches > main > b254107 > files / src / net / bowmap
Fix error messages
Commit: b25410762c0096070bd9f1112f6cdaf0004b0a44
Parent: 1e3557f
2 changed files:
src/net/bowmap/network/minecraft_server.clj view file
@@ -28,6 +28,7 @@ (>!! serverbound-frames (connection/read-frame!! connection)) (recur)) (catch EOFException _)+ (catch SocketException _) (finally (close! serverbound-frames)))) (>!! connections connection))src/net/bowmap/network/server.clj view file
@@ -6,7 +6,9 @@ [net.bowmap.network.handle :as handle] [net.bowmap.network.minecraft-server :as mc] [net.bowmap.network.packets.serverbound :refer [decode-packet!]]- [net.bowmap.network.state :as state]))+ [net.bowmap.network.state :as state])+ (:import+ [java.io EOFException])) (defn handle-connection [connection] (io-thread@@ -20,13 +22,13 @@ serverbound-frames ([frame] (if (some? frame) (handle/handle!! client (decode-packet! frame (::state/connection-state client)))- (throw (Exception. "Reached end of client socket"))))+ (throw (EOFException. "Reached end of client socket")))) clientbound-packets ([pk] (if (some? pk) (do (send-packet!! client pk) client) (throw (Exception. "Clientbound packets was closed idk why"))))))))- (catch Exception _)+ (catch EOFException _) (finally ; TODO Send player disconnected fact, and update the player list from that (connection/close! connection)))))