Skip to content

Commit f92e278

Browse files
Merge pull request #92 from bugsnag/null-check-delivery
fix: add null check when disconnecting HttpUrlConnection
2 parents 8549093 + 8f5b6e2 commit f92e278

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 3.2.1 (TBD)
4+
5+
* Add null check when disconnecting HttpUrlConnection
6+
[#92](https://github.com/bugsnag/bugsnag-java/pull/92)
7+
38
## 3.2.0 (2018-07-03)
49

510
This release introduces automatic tracking of sessions, which by

src/main/java/com/bugsnag/delivery/SyncHttpDelivery.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public void deliver(Serializer serializer, Object object, Map<String, String> he
9797
} catch (IOException ex) {
9898
logger.warn("Error not reported to Bugsnag - exception when making request", ex);
9999
} finally {
100-
connection.disconnect();
100+
if (connection != null) {
101+
connection.disconnect();
102+
}
101103
}
102104
}
103105

0 commit comments

Comments
 (0)