aboutsummaryrefslogtreecommitdiff
path: root/client_conn.go
diff options
context:
space:
mode:
Diffstat (limited to 'client_conn.go')
-rw-r--r--client_conn.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/client_conn.go b/client_conn.go
index 4be45ba..d665cc5 100644
--- a/client_conn.go
+++ b/client_conn.go
@@ -10,6 +10,7 @@ import (
"github.com/HimbeerserverDE/srp"
"github.com/anon55555/mt"
+ "github.com/anon55555/mt/rudp"
)
type clientState uint8
@@ -63,7 +64,12 @@ func handleClt(cc *clientConn) {
pkt, err := cc.Recv()
if err != nil {
if errors.Is(err, net.ErrClosed) {
- cc.log("<->", "disconnect")
+ if errors.Is(cc.WhyClosed(), rudp.ErrTimedOut) {
+ cc.log("<->", "timeout")
+ } else {
+ cc.log("<->", "disconnect")
+ }
+
if cc.name != "" {
playersMu.Lock()
delete(players, cc.name)