Skip to content

Commit bb4450b

Browse files
committed
reconnect
1 parent 1be2c49 commit bb4450b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CoAP.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ void Coap::iSYNC_POST(String key,String msg){
383383
while((millis() - lasttime < 10000) && !this->ready){this->loop();};
384384
if(!this->ready){
385385
Serial.print(F("Reconnect..."));
386+
BC95.reset();
386387
while (!BC95.attachNetwork()) {
387388
Serial.print(".");
388389
delay(500);
@@ -400,6 +401,7 @@ void Coap::iSYNC_GET(String key){
400401
while((millis() - lasttime < 10000) && !this->ready){this->loop();};
401402
if(!this->ready){
402403
Serial.print(F("Reconnect..."));
404+
BC95.reset();
403405
while (!BC95.attachNetwork()) {
404406
Serial.print(".");
405407
delay(500);

0 commit comments

Comments
 (0)