Sitelet https://github.com/keep-trying-00/java/commit/6cf9a7142785d7cc63105ecdcb7c71879be71833
Skip to content

Commit 6cf9a71

Browse files
author
Devendra
committed
debug info
1 parent 91dd5d3 commit 6cf9a71

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎java/examples/src/com/pubnub/examples/PubnubDemoConsole.java‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,14 @@ public void errorCallback(String channel, PubnubError error) {
210210
}
211211

212212
private void unsubscribe(String channel) {
213-
pubnub.unsubscribe(channel);
213+
pubnub.unsubscribe(channel, new Callback(){
214+
public void successCallback(String channel, Object message) {
215+
System.out.println(message);
216+
}
217+
public void errorCallback(String channel, PubnubError error) {
218+
System.out.println(error);
219+
}
220+
});
214221
}
215222

216223
private void unsubscribeFromGroup(String groupName) {

‎java/src1/com/pubnub/api/HttpClientCore.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public synchronized HttpResponse fetch(String url, Hashtable headers)
8787
throws PubnubException, SocketTimeoutException {
8888
URL urlobj = null;
8989
log.verbose("FETCHING URL : " + url);
90-
//System.out.println(url);
9190
try {
9291
urlobj = new URL(url);
9392
} catch (MalformedURLException e3) {
@@ -262,8 +261,10 @@ public boolean isOk(int rc) {
262261
public void shutdown() {
263262
if (connection != null) {
264263
try {
264+
log.verbose("Connection Abort : " + connection.getURL());
265265
connection.disconnect();
266266
} catch (Exception e) {
267+
log.verbose("Exception in connection abort : " + e.toString() + " : " + connection.getURL());
267268
}
268269
}
269270
}

0 commit comments

Comments
 (0)