fix socket assert
This commit is contained in:
parent
1919988413
commit
308e68972d
|
@ -183,12 +183,16 @@ class TAdapter:
|
||||||
s.settimeout(3)
|
s.settimeout(3)
|
||||||
try:
|
try:
|
||||||
res = s.connect_ex((self.remoteIP, taosadapter_port))
|
res = s.connect_ex((self.remoteIP, taosadapter_port))
|
||||||
|
s.shutdown(2)
|
||||||
if res == 0:
|
if res == 0:
|
||||||
tdLog.info(f"the taosadapter has been started, using port:{taosadapter_port}")
|
tdLog.info(f"the taosadapter has been started, using port:{taosadapter_port}")
|
||||||
else:
|
else:
|
||||||
tdLog.info(f"the taosadapter do not started!!!")
|
tdLog.info(f"the taosadapter do not started!!!")
|
||||||
except socket.error as e:
|
except socket.error as e:
|
||||||
tdLog.notice("socket connect error!")
|
tdLog.notice("socket connect error!")
|
||||||
|
finally:
|
||||||
|
if s:
|
||||||
|
s.close()
|
||||||
# tdLog.debug("the taosadapter has been started.")
|
# tdLog.debug("the taosadapter has been started.")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue