diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-01-06 17:34:47 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-01-06 17:34:47 +0200 |
| commit | 1a218730e9a0c16fd71f4606adfde5862be2e7b7 (patch) | |
| tree | bebf7d03f96f95174afbc0268af58dc7ca09c958 /internal/server/api | |
| parent | db57a31b08c1a3b00c2e253f02e67119e3cfa108 (diff) | |
Server now disconnects connection when a new connection matches the same
user ID, note that there seems to be a weird thing where if 2 clients
are from the same IP, the disconnected client will just reconnect to the
new client's socket, so they will both use the same connection for
communication
Diffstat (limited to 'internal/server/api')
| -rw-r--r-- | internal/server/api/helpers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/server/api/helpers.go b/internal/server/api/helpers.go index 05dae0e..0ab6ae5 100644 --- a/internal/server/api/helpers.go +++ b/internal/server/api/helpers.go @@ -78,7 +78,7 @@ func NetworkPropagate( context, cancel := context.WithTimeout(context.Background(), timeout) go func() { defer cancel() - pkt := packet.NewPacket(packet.NewJsonEncoder(payload)) + pkt := packet.NewPacket(packet.NewMsgPackEncoder(payload)) if ok := session.Write(context, pkt); !ok { log.Println(sess.Addr(), "propagation to", session.Addr(), "failed") } |
