Skip to content

Commit

Permalink
Merge pull request #7 from loganlinn/port-parse-int
Browse files Browse the repository at this point in the history
Allow port to be string, prevent silent failures
  • Loading branch information
pyr committed Jan 17, 2013
2 parents e2ad667 + 462a6c0 commit ad1b485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clj_statsd.clj
Expand Up @@ -19,7 +19,7 @@
(send sockagt #(or % (DatagramSocket.)))
(swap! cfg #(or % (merge {:random (Random.)
:host (InetAddress/getByName host)
:port port}
:port (if (integer? port) port (Integer/parseInt port))}
(apply hash-map opts)))))

(defn send-stat
Expand Down

0 comments on commit ad1b485

Please sign in to comment.