summaryrefslogtreecommitdiff
path: root/internal/client/gateway
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-03 19:33:30 +0200
committerKyren223 <Kyren223@proton.me>2024-11-03 19:33:30 +0200
commitff3140a4089819489130a0908178a63eff20f708 (patch)
treedef568e1deca7461f814e55af7d9e09720e0b0ae /internal/client/gateway
parenta637ea9c335c385985a23510a4174d837fb51faf (diff)
feat: add username and timestamp to messages
Diffstat (limited to 'internal/client/gateway')
-rw-r--r--internal/client/gateway/gateway.go5
1 files changed, 5 insertions, 0 deletions
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