From 3bb2de4a8570125fea81a683da70b1f6a7347a4e Mon Sep 17 00:00:00 2001 From: Markus Sattler Date: Mon, 6 Apr 2015 19:17:19 +0200 Subject: [PATCH] add flush() to unref() see #50 --- cores/esp8266/WString.h | 1 + libraries/ESP8266WiFi/src/include/ClientContext.h | 1 + 2 files changed, 2 insertions(+) diff --git a/cores/esp8266/WString.h b/cores/esp8266/WString.h index 269b70291..7f5786449 100644 --- a/cores/esp8266/WString.h +++ b/cores/esp8266/WString.h @@ -33,6 +33,7 @@ class StringSumHelper; typedef char* __FlashStringHelper; +//#define F(str) []() -> const char * { static const char tmp[] ICACHE_RODATA_ATTR = str; return &tmp[0]; }() #define F(str) str // The string class diff --git a/libraries/ESP8266WiFi/src/include/ClientContext.h b/libraries/ESP8266WiFi/src/include/ClientContext.h index ed7af4b0b..af8209af8 100644 --- a/libraries/ESP8266WiFi/src/include/ClientContext.h +++ b/libraries/ESP8266WiFi/src/include/ClientContext.h @@ -77,6 +77,7 @@ public: DEBUGV(":ur %d\r\n", _refcnt); if (--_refcnt == 0) { + flush(); if (_pcb) { tcp_arg(_pcb, NULL);