Skip to content

Commit

Permalink
Fixed issues introduced in #1942. (#2045)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaff authored and slav-at-attachix committed Feb 6, 2020
1 parent 40d412e commit 7f9f5bb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Sming/Core/Network/TcpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ TcpConnection* TcpServer::createClient(tcp_pcb* clientTcp)
return con;
}

//Timer stateTimer;
void list_mem()
{
debug_d("Free heap size=%u, K=%u", system_get_free_heap_size(), TcpServer::totalConnections);
}

void TcpServer::setKeepAlive(uint16_t seconds)
{
debug_d("Server keep-alive updating: %u -> %u", keepAlive, seconds);
Expand All @@ -53,7 +47,6 @@ bool TcpServer::listen(int port, bool useSsl)
tcp = tcp_listen(tcp);
tcp_accept(tcp, staticAccept);

//stateTimer.initializeMs(3500, list_mem).start();
return true;
}

Expand All @@ -72,8 +65,8 @@ err_t TcpServer::onAccept(tcp_pcb* clientTcp, err_t err)
}

#ifdef NETWORK_DEBUG
debug_d("onAccept, tcp: %p, state: %d K=%d", clientTcp, err, connections.count());
list_mem();
debug_d("onAccept, tcp: %p, state: %d K=%d, Free heap size=%u", clientTcp, err, connections.count(),
system_get_free_heap_size());
#endif

if(err != ERR_OK) {
Expand Down

0 comments on commit 7f9f5bb

Please sign in to comment.