Skip to content

Commit

Permalink
Merge pull request OpenTSDB#295 from benrubson/pickconnection
Browse files Browse the repository at this point in the history
Avoid picking new connection if we only have one host defined
  • Loading branch information
johann8384 committed Mar 1, 2016
2 parents 7cab8c5 + 61492b8 commit ee2baf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,8 @@ def send_data_via_http(self):
indent=4)
return

self.pick_connection()
if((self.current_tsd == -1) or (len(self.hosts) > 1)):
self.pick_connection()
# print "Using server: %s:%s" % (self.host, self.port)
# url = "http://%s:%s/api/put?details" % (self.host, self.port)
# print "Url is %s" % url
Expand Down

0 comments on commit ee2baf8

Please sign in to comment.