goldsimon b1b6275110 socket/netconn recv: FIN should only be reported once
FIN should only be reported once (as '0' for sockets, as 'ERR_CLSD' for
netconns). Before this change, ERR_CLSD was returned forever...

This is the 2nd try. First try (commit ebcae98ae65c26a0c210c802540bf027d07fe2f1)
was buggy in that it could drop the FIN if it was read together with data
(reverted in commit ebcae98ae65c26a0c210c802540bf027d07fe2f1).

This version fixes this by adding an apiflag and a netconn flag to keep
track of this.
2018-02-04 20:16:53 +01:00
..