Open bremoran opened 8 years ago
ARM Internal Ref: IOTSFW-1092
The sockets layer and the LwIP adaptor forward failure codes correctly. The problem here is that LwIP's behaviour on allocation of a TCP Protocol Control Block is to kill off a previous control block if the current control block is of higher priority. By default, LwIP sets all TCP PCBs to the same priority, so this seems to allow LwIP to kill off an existing connection in order to allocate the current one.
Since this is LwIP internal behaviour, it is not viable to fix this issue.
When allocating a TCP protocol control buffer fails,
TCPStream::connect()
andTCPStream::open()
should return an error code.