perf(cmpp): reserve transport for inbound submit
This commit is contained in:
@@ -290,7 +290,13 @@ func setInboundSubmitResponse(packet any, messageID uint64, result uint32) {
|
||||
func (s Server) submit(remote net.Addr, payload submitRequest) (submitResponse, error) {
|
||||
payload.RemoteIP = remoteIP(remote)
|
||||
var result submitResponse
|
||||
err := s.post(context.Background(), "/gateway/events/inbound/submit", payload, &result)
|
||||
client := s.SubmitHTTPClient
|
||||
if client == nil {
|
||||
client = s.HTTPClient
|
||||
}
|
||||
// Submit has a dedicated transport so protocol logs, receipt recovery and
|
||||
// presence traffic cannot occupy the connections needed for SubmitResp.
|
||||
err := s.postWithClient(context.Background(), client, "/gateway/events/inbound/submit", payload, &result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user