[fix] mbed sent/receive/close sequence
[fix] layers close sequence fixes