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:
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user