Commit 7f3dcbf5 authored by Denis Bilenko's avatar Denis Bilenko

ares.channel: in case of errors in set_servers(), __init__ no longer fails with TypeError

parent 4e58ed71
......@@ -257,12 +257,12 @@ cdef public class channel [object PyGeventAresChannelObject, type PyGeventAresCh
result = cares.ares_init_options(&channel, &options, optmask)
if result:
raise get_socket_gaierror()(result, strerror(result))
self._watchers = {}
self.channel = channel
try:
self.channel = channel
if servers is not None:
self.set_servers(servers)
self.loop = loop
self._watchers = {}
except:
self.destroy()
raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment