mirror of https://github.com/ARMmbed/mbed-os.git
Add socket stat logging state change update
TCPServer was deprecated and the accept call was added to TCPSocket. Add state change update to that callpull/9079/head
parent
e2ae84ec59
commit
ee3945dfa3
|
@ -288,6 +288,8 @@ TCPSocket *TCPSocket::accept(nsapi_error_t *error)
|
|||
|
||||
if (0 == ret) {
|
||||
connection = new TCPSocket(this, socket, address);
|
||||
_socket_stats.stats_update_peer(connection, address);
|
||||
_socket_stats.stats_update_socket_state(connection, SOCK_CONNECTED);
|
||||
break;
|
||||
} else if ((_timeout == 0) || (ret != NSAPI_ERROR_WOULD_BLOCK)) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue