From a56b4261ae39d4d416211a64e9622d8d13e57440 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 5 Apr 2018 17:15:49 +0200 Subject: [PATCH] Added more error checking for the client with invalid hosts --- src/dorkbox/network/Client.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dorkbox/network/Client.java b/src/dorkbox/network/Client.java index f066e888..688c2ed7 100644 --- a/src/dorkbox/network/Client.java +++ b/src/dorkbox/network/Client.java @@ -123,6 +123,10 @@ class Client extends EndPointClient implements Connection throw new IllegalArgumentException("You must define what host you want to connect to."); } + if (config.host.equals("0.0.0.0")) { + throw new IllegalArgumentException("You cannot connect to 0.0.0.0, you must define what host you want to connect to."); + } + if (config.tcpPort <= 0 && config.udpPort <= 0) { throw new IllegalArgumentException("You must define what port you want to connect to."); }