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) {
71
71
{
72
72
return 0 ;
73
73
}
74
- }else {
74
+ } else {
75
75
Serial.println (" No Socket available" );
76
76
return 0 ;
77
77
}
@@ -100,7 +100,7 @@ int WiFiClient::connectSSL(IPAddress ip, uint16_t port)
100
100
{
101
101
return 0 ;
102
102
}
103
- }else {
103
+ } else {
104
104
Serial.println (" No Socket available" );
105
105
return 0 ;
106
106
}
@@ -109,6 +109,11 @@ int WiFiClient::connectSSL(IPAddress ip, uint16_t port)
109
109
110
110
int WiFiClient::connectSSL (const char *host, uint16_t port)
111
111
{
112
+ if (_sock != NO_SOCKET_AVAIL)
113
+ {
114
+ stop ();
115
+ }
116
+
112
117
_sock = ServerDrv::getSocket ();
113
118
if (_sock != NO_SOCKET_AVAIL)
114
119
{
@@ -124,7 +129,7 @@ int WiFiClient::connectSSL(const char *host, uint16_t port)
124
129
{
125
130
return 0 ;
126
131
}
127
- }else {
132
+ } else {
128
133
Serial.println (" No Socket available" );
129
134
return 0 ;
130
135
}
You can’t perform that action at this time.
0 commit comments