1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-15 00:02:49 +03:00

move discard_cb to unref

This commit is contained in:
ficeto
2015-05-12 14:22:16 +03:00
parent 88c6ee418d
commit 1707d3d036

View File

@ -94,6 +94,7 @@ class ClientContext {
if(--_refcnt == 0) { if(--_refcnt == 0) {
flush(); flush();
close(); close();
if(_discard_cb) _discard_cb(_discard_cb_arg, this);
delete this; delete this;
} }
} }
@ -231,7 +232,6 @@ class ClientContext {
if(pb == 0) // connection closed if(pb == 0) // connection closed
{ {
if(_discard_cb) _discard_cb(_discard_cb_arg, this);
DEBUGV(":rcla\r\n"); DEBUGV(":rcla\r\n");
return abort(); return abort();
} }