From ff3140a4089819489130a0908178a63eff20f708 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 3 Nov 2024 19:33:30 +0200 Subject: feat: add username and timestamp to messages --- internal/client/gateway/gateway.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/client/gateway') diff --git a/internal/client/gateway/gateway.go b/internal/client/gateway/gateway.go index c196b1b..56f1ade 100644 --- a/internal/client/gateway/gateway.go +++ b/internal/client/gateway/gateway.go @@ -196,6 +196,11 @@ func Send(request packet.Payload) <-chan packet.Payload { asyncResponses = append(asyncResponses, responseChan) responsesMu.Unlock() + // TODO: this is a really bad implementation + // Should refactor to make it better + // Maybe have a timeout function similar to the one on the server? + // In any case this is like super bad to just arbitrary hang for 5 seconds + // And then try to close the thing so it times out time.Sleep(5 * time.Second) responsesMu.Lock() index := -1 -- cgit v1.3.1