Skip to content

Commit

Permalink
Add socket stat logging state change update
Browse files Browse the repository at this point in the history
TCPServer was deprecated and the accept call was added to TCPSocket. Add state change update to that call
  • Loading branch information
kegilbert committed Dec 13, 2018
1 parent e2ae84e commit ee3945d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions features/netsocket/TCPSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee3945d

Please sign in to comment.