@@ -636,7 +636,7 @@ def socket_open(self, socket_num, dest, port, conn_mode=TCP_MODE):
636
636
self ._socknum_ll [0 ][0 ] = socket_num
637
637
if self ._debug :
638
638
print ("*** Open socket to" , dest , port , conn_mode )
639
- if conn_mode == TLS_MODE and self ._tls_socket is not None :
639
+ if conn_mode == ESP_SPIcontrol . TLS_MODE and self ._tls_socket is not None :
640
640
raise OSError (23 ) # ENFILE - File table overflow
641
641
port_param = struct .pack (">H" , port )
642
642
if isinstance (dest , str ): # use the 5 arg version
@@ -658,7 +658,7 @@ def socket_open(self, socket_num, dest, port, conn_mode=TCP_MODE):
658
658
)
659
659
if resp [0 ][0 ] != 1 :
660
660
raise RuntimeError ("Could not connect to remote server" )
661
- if conn_mode == TLS_MODE :
661
+ if conn_mode == ESP_SPIcontrol . TLS_MODE :
662
662
self ._tls_socket = socket_num
663
663
664
664
def socket_status (self , socket_num ):
@@ -772,7 +772,7 @@ def socket_close(self, socket_num):
772
772
print ("*** Closing socket #%d" % socket_num )
773
773
self ._socknum_ll [0 ][0 ] = socket_num
774
774
try :
775
- resp = self ._send_command_get_response (
775
+ self ._send_command_get_response (
776
776
_STOP_CLIENT_TCP_CMD , self ._socknum_ll
777
777
)
778
778
except RuntimeError :
0 commit comments