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:
@ -5,7 +5,7 @@ import (
|
||||
"forge.redroom.link/yves/meowlib/client"
|
||||
)
|
||||
|
||||
func HttpSendMessage(serverUid string, message []byte) ([]byte, error) {
|
||||
func HttpSendMessage(serverUid string, message []byte, timeout int) ([]byte, error) {
|
||||
id := client.GetConfig().GetIdentity()
|
||||
srv, err := id.MessageServers.LoadServer(serverUid)
|
||||
if err != nil {
|
||||
@ -22,7 +22,7 @@ func HttpSendMessage(serverUid string, message []byte) ([]byte, error) {
|
||||
id.MessageServers.StoreServer(srv)
|
||||
}
|
||||
|
||||
response, err := meowlib.HttpPostMessage(srv.Url, message)
|
||||
response, err := meowlib.HttpPostMessage(srv.Url, message, timeout)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user