manage http timeout to allow long poll
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-04-20 22:29:22 +02:00
parent 7c17a11426
commit d14cd161da
4 changed files with 14 additions and 7 deletions

View File

@ -27,7 +27,7 @@ type ReceivedMessage struct {
}
// CheckForMessages checks for messages on a single server
func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string, error) {
func CheckForMessages(storage_path string, job *client.RequestsJob, timeout int) (int, string, error) {
count := 0
@ -68,7 +68,7 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string
return -1, "CheckMessages: ProcessOutboundMessage", err
}
response, err := meowlib.HttpPostMessage(job.Server.Url, data)
response, err := meowlib.HttpPostMessage(job.Server.Url, data, timeout)
if err != nil {
return -1, "CheckMessages: httpPostMessage", err
}