Skip to content

Commit ee3945d

Browse files
committed
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
1 parent e2ae84e commit ee3945d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

features/netsocket/TCPSocket.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ TCPSocket *TCPSocket::accept(nsapi_error_t *error)
288288

289289
if (0 == ret) {
290290
connection = new TCPSocket(this, socket, address);
291+
_socket_stats.stats_update_peer(connection, address);
292+
_socket_stats.stats_update_socket_state(connection, SOCK_CONNECTED);
291293
break;
292294
} else if ((_timeout == 0) || (ret != NSAPI_ERROR_WOULD_BLOCK)) {
293295
break;

0 commit comments

Comments
 (0)