Skip to content

Commit 06748af

Browse files
authored
Merge pull request #9079 from kegilbert/TCPSocket-accept-statelog
Add socket stat logging state change update
2 parents eda1952 + ee3945d commit 06748af

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)