manage http timeout to allow long poll
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user