Do not go through API if already on LwIP thread

This commit is contained in:
me-no-dev
2017-10-13 10:37:57 +03:00
parent 9d6150e855
commit a1a184a953
2 changed files with 62 additions and 11 deletions
+3
View File
@@ -156,6 +156,8 @@ class AsyncClient {
static int8_t _s_sent(void *arg, struct tcp_pcb *tpcb, uint16_t len);
static int8_t _s_connected(void* arg, void* tpcb, int8_t err);
static void _s_dns_found(const char *name, struct _ip_addr *ipaddr, void *arg);
bool _in_lwip_thread;
};
class AsyncServer {
@@ -163,6 +165,7 @@ class AsyncServer {
uint16_t _port;
IPAddress _addr;
bool _noDelay;
bool _in_lwip_thread;
tcp_pcb* _pcb;
AcConnectHandler _connect_cb;
void* _connect_cb_arg;