File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ int WiFiClient::connect(IPAddress ip, uint16_t port) {
7171 {
7272 return 0 ;
7373 }
74- }else {
74+ } else {
7575 Serial.println (" No Socket available" );
7676 return 0 ;
7777 }
@@ -100,7 +100,7 @@ int WiFiClient::connectSSL(IPAddress ip, uint16_t port)
100100 {
101101 return 0 ;
102102 }
103- }else {
103+ } else {
104104 Serial.println (" No Socket available" );
105105 return 0 ;
106106 }
@@ -109,6 +109,11 @@ int WiFiClient::connectSSL(IPAddress ip, uint16_t port)
109109
110110int WiFiClient::connectSSL (const char *host, uint16_t port)
111111{
112+ if (_sock != NO_SOCKET_AVAIL)
113+ {
114+ stop ();
115+ }
116+
112117 _sock = ServerDrv::getSocket ();
113118 if (_sock != NO_SOCKET_AVAIL)
114119 {
@@ -124,7 +129,7 @@ int WiFiClient::connectSSL(const char *host, uint16_t port)
124129 {
125130 return 0 ;
126131 }
127- }else {
132+ } else {
128133 Serial.println (" No Socket available" );
129134 return 0 ;
130135 }
You can’t perform that action at this time.
0 commit comments