Skip to content

Commit 894f99b

Browse files
ficetoficeto
ficeto
authored and
ficeto
committed
move discard_cb to unref
1 parent 4f9597d commit 894f99b

File tree

1 file changed

+1
-1
lines changed
  • hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/include

1 file changed

+1
-1
lines changed

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/include/ClientContext.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class ClientContext {
9494
if(--_refcnt == 0) {
9595
flush();
9696
close();
97+
if(_discard_cb) _discard_cb(_discard_cb_arg, this);
9798
delete this;
9899
}
99100
}
@@ -231,7 +232,6 @@ class ClientContext {
231232

232233
if(pb == 0) // connection closed
233234
{
234-
if(_discard_cb) _discard_cb(_discard_cb_arg, this);
235235
DEBUGV(":rcla\r\n");
236236
return abort();
237237
}

0 commit comments

Comments
 (0)