@@ -670,13 +670,13 @@ inline PubNonSubClient* PubNub::publish(const char* channel,
670
670
DBGprintln (" publish() BH_ERROR" );
671
671
client.stop ();
672
672
while (client.connected ())
673
- ;
673
+ delay ( 10 ) ;
674
674
return 0 ;
675
675
case PubNub_BH_TIMEOUT:
676
676
DBGprintln (" publish() BH_TIMEOUT" );
677
677
client.stop ();
678
678
while (client.connected ())
679
- ;
679
+ delay ( 10 ) ;
680
680
return 0 ;
681
681
}
682
682
}
@@ -727,14 +727,14 @@ inline PubSubClient* PubNub::subscribe(const char* channel, int timeout)
727
727
DBGprintln (" No data received!" );
728
728
client.stop ();
729
729
while (client.connected ())
730
- ;
730
+ delay ( 10 ) ;
731
731
return 0 ;
732
732
}
733
733
if (client.read () != ' [' ) {
734
734
DBGprintln (" Unexpected body in subscribe response" );
735
735
client.stop ();
736
736
while (client.connected ())
737
- ;
737
+ delay ( 10 ) ;
738
738
return 0 ;
739
739
}
740
740
/* Now return handle to the client for further perusal.
@@ -748,15 +748,15 @@ inline PubSubClient* PubNub::subscribe(const char* channel, int timeout)
748
748
DBGprintln (" subscribe() BH_ERROR" );
749
749
client.stop ();
750
750
while (client.connected ())
751
- ;
751
+ delay ( 10 ) ;
752
752
return 0 ;
753
753
754
754
case PubNub_BH_TIMEOUT:
755
755
DBGprintln (" subscribe() BH_TIMEOUT" );
756
756
client.stop ();
757
757
DBGprintln (" subscribe() BH_TIMEOUT stopped" );
758
758
while (client.connected ())
759
- ;
759
+ delay ( 10 ) ;
760
760
DBGprintln (" subscribe() BH_TIMEOUT disconnected" );
761
761
return 0 ;
762
762
}
@@ -791,13 +791,13 @@ inline PubNonSubClient* PubNub::history(const char* channel, int limit, int time
791
791
DBGprintln (" history() BH_ERROR" );
792
792
client.stop ();
793
793
while (client.connected ())
794
- ;
794
+ delay ( 10 ) ;
795
795
return 0 ;
796
796
case PubNub_BH_TIMEOUT:
797
797
DBGprintln (" history() BH_TIMEOUT" );
798
798
client.stop ();
799
799
while (client.connected ())
800
- ;
800
+ delay ( 10 ) ;
801
801
return 0 ;
802
802
}
803
803
}
0 commit comments