Commit cb644b2b authored by Olivier Crête's avatar Olivier Crête

pseudotcp: close local socket on initial transmission error

This is required as no retransmissions will happen
parent 23331ff2
...@@ -2136,6 +2136,7 @@ attempt_send(PseudoTcpSocket *self, SendFlags sflags) ...@@ -2136,6 +2136,7 @@ attempt_send(PseudoTcpSocket *self, SendFlags sflags)
gsize snd_buffered; gsize snd_buffered;
GList *iter; GList *iter;
SSegment *sseg; SSegment *sseg;
int transmit_status;
cwnd = priv->cwnd; cwnd = priv->cwnd;
if ((priv->dup_acks == 1) || (priv->dup_acks == 2)) { // Limited Transmit if ((priv->dup_acks == 1) || (priv->dup_acks == 2)) { // Limited Transmit
...@@ -2211,9 +2212,12 @@ attempt_send(PseudoTcpSocket *self, SendFlags sflags) ...@@ -2211,9 +2212,12 @@ attempt_send(PseudoTcpSocket *self, SendFlags sflags)
subseg); subseg);
} }
if (transmit(self, sseg, now) != 0) { transmit_status = transmit(self, sseg, now);
if (transmit_status != 0) {
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "transmit failed"); DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "transmit failed");
// TODO: consider closing socket
// TODO: Is this the right thing ?
closedown (self, transmit_status, CLOSEDOWN_REMOTE);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment