The `event` function in `TCPSocket` increments the internal `_pending` variable and doesn't send an event if the value of `_pending` s not 1: https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L166 However, it seems that only [send](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L83) and [recv](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L83) set the value of that variable to 0. This means that events will be fired for send and receive operations, but not for `close` operations (https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.cpp#L66) unless `_pending` happens to be 0. Is this a bug or I'm not using socket events properly? @marcuschangarm