+
+ /*
+ * If we reach here, we've finished sending everything we might
+ * have needed to send. Send EOF, if we need to.
+ */
+ if (s->outgoingeof == EOF_PENDING) {
+ shutdown(s->s, SHUT_WR);
+ s->outgoingeof = EOF_SENT;
+ }
+
+ /*
+ * Also update the select status, because we don't need to select
+ * for writing any more.
+ */