[OpenSIPS-Devel] [OpenSIPS/opensips] f1f9a9: protos/tcp: respect async operations order

Razvan Crainea razvan at opensips.org
Thu Jan 11 07:16:13 EST 2018


  Branch: refs/heads/2.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: f1f9a9298e24f8c26285115959af8f180b3d22f5
      https://github.com/OpenSIPS/opensips/commit/f1f9a9298e24f8c26285115959af8f180b3d22f5
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2018-01-11 (Thu, 11 Jan 2018)

  Changed paths:
    M modules/proto_bin/proto_bin.c
    M modules/proto_hep/proto_hep.c
    M net/proto_tcp/proto_tcp.c

  Log Message:
  -----------
  protos/tcp: respect async operations order

In case there is a write request, before actually writing the data on
the network, check if there are any async chunks left, and make sure
they are sent before any other write happens. This is necessary to make
sure the order of the packets is respected, otherwise we might end up
with fragments of other packets in the stream.

Thanks go to Vlad Patrascu for reporting and testing this.

(cherry picked from commit 5773e65b9058643191544763e0f5ff26f5a7fb3b)




More information about the Devel mailing list