Skip to content

Commit 9eeedee

Browse files
vveljkoMaxPresman
authored andcommitted
Develop (#18)
* Improve debug logging. * Version bump
1 parent d3fa0c1 commit 9eeedee

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

PubNubDefs.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,10 @@ inline PubNub_BASE_CLIENT *PubNub::publish(const char *channel, const char *mess
485485
t_start = millis();
486486
/* connect() timeout is about 30s, much lower than our usual
487487
* timeout is. */
488-
if (!client.connect(d_origin, 80)) {
489-
DBGprintln("Connection error");
488+
int rslt = client.connect(d_origin, 80);
489+
if (rslt != 1) {
490+
DBGprint("Connection error ");
491+
DBGprintln(rslt);
490492
client.stop();
491493
return 0;
492494
}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ a note about timeouts below.
128128
This is not an officially supported API, it is there mostly for
129129
convinience for people that used it
130130

131+
### Debug logging
132+
133+
To enable debugg logging to the Arduino console, add
134+
135+
#define PUBNUB_DEBUG
136+
137+
before `#include <PubNub.h>`
138+
131139
## Installation
132140

133141
Since version 1.1.1, Pubnub SDK is part of the Arduino Library

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Pubnub
2-
version=2.1.0
2+
version=2.1.1
33
author=Vladimir Veljkovic <[email protected]>
44
maintainer=Vladimir Veljkovic <[email protected]>
55
sentence=Pubnub SDK for Arduino.

0 commit comments

Comments
 (0)