Add socket stat logging state change update

TCPServer was deprecated and the accept call was added to TCPSocket. Add state change update to that call
pull/9079/head
kegilbert 2018-12-12 18:04:48 -06:00
parent e2ae84ec59
commit ee3945dfa3
1 changed files with 2 additions and 0 deletions

View File

@ -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;