[mbed::net] Not shutting down the socket, before closing it, is not robust in lwIP