Skip to content

Commit c42eb8b

Browse files
authored
feat: bail early if the statsd host is un/misconfigured (#40)
1 parent 499c70b commit c42eb8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cpp-statsd-client/UDPSender.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ inline UDPSender::UDPSender(const std::string& host,
181181
const uint64_t sendInterval) noexcept
182182
: m_host(host), m_port(port), m_batchsize(batchsize), m_sendInterval(sendInterval) {
183183
// Initialize the socket
184-
if (!initialize()) {
184+
if (m_host.empty() || !initialize()) {
185185
return;
186186
}
187187

0 commit comments

Comments
 (0)