We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef14f4c commit 5a9a3ceCopy full SHA for 5a9a3ce
src/main/java/cz/mallat/uasparser/OnlineUpdateUASparser.java
@@ -3,6 +3,7 @@
3
import java.io.IOException;
4
import java.io.InputStream;
5
import java.net.URL;
6
+import java.net.ConnectException;
7
8
import cz.mallat.uasparser.fileparser.PHPFileParser;
9
@@ -60,7 +61,12 @@ private void loadDataFromInternet() throws IOException {
60
61
*/
62
protected String getVersionFromServer() throws IOException {
63
URL url = new URL(VERSION_CHECK_URL);
- InputStream is = url.openStream();
64
+ try{
65
+ InputStream is = url.openStream();
66
+ } catch (ConnectException e) {
67
+ return '0';
68
+ }
69
+
70
try {
71
byte[] buff = new byte[4048];
72
int len = is.read(buff);
0 commit comments