LP#1339190 SIP Multiplex repairs
authorBill Erickson <berick@esilibrary.com>
Thu, 12 Sep 2013 20:15:54 +0000 (16:15 -0400)
committerBill Erickson <berick@esilibrary.com>
Fri, 8 Aug 2014 14:23:14 +0000 (10:23 -0400)
commitdab01d6022513320fc75fdafab57e40ba4274546
tree38ffc91c5e91d5ca169ed65b5bc1986e676c6825
parent70456ab85e5c0a0a807e0b7698b16deb97b3c4ee
LP#1339190 SIP Multiplex repairs

 * mux_input params / string handling - no reading from $fh
 * until proven otherwise, capture mux $fh for later writing -- may be
   unnecessary.
 * minor thinkos
 * remove output_fh tracking.  It's not needed.
 * write output Sip::write_msg via POSIX::write to bypass IO::Multiplex
   output buffer caching.  This is needed since SIP child procs never
   return from mux_input (they exit) so the cached output is never
   sent to the client.
* Use the stringified file handle as the connection ID instead of the
  fileno.  This allows us to find the connection during mux_close,
  where, since the file handle has already been close, fileno($fh)
  returns undef.
* Don't allow a connection-level die() to affect the parent process.  The
 parent process must be highly resilient.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
SIPServer.pm
Sip.pm