#974 mod_smacks causes two TCP segments to be sent

Reporter ge0rg
Owner Nobody
Created
Updated
Stars ★★ (2)  
Tags
  • Status-New
  • Priority-Medium
  • Type-Defect
  1. ge0rg on

    Whenever mod_smacks issues an <r/> over a session, it will do session.send right after the stanza that caused the transmission (every stanza by default) has been sent. That means, the transmission goes like that: ``` --> stanza(s) <-- ack --> <r/> (Nagle's algorithm makes the TCP stack wait for the ack until sending out the next incomplete segment) <-- ack <-- <a/> --> ack ``` It would be great if prosody could piggy-back the <r/> on the stanza(s) segment, to reduce the number of round trips and the battery drain on mobile clients. Thanks.

New comment