File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -166,20 +166,23 @@ int ArduinoCellular::getSignalQuality(){
166
166
}
167
167
168
168
TinyGsmClient ArduinoCellular::getNetworkClient (){
169
- return TinyGsmClient (modem);
169
+ return TinyGsmClient (modem, 0 );
170
170
}
171
171
172
172
HttpClient ArduinoCellular::getHTTPClient (const char * server, const int port){
173
- return HttpClient (* new TinyGsmClient (modem), server, port);
173
+ TinyGsmClient client = getNetworkClient ();
174
+ return HttpClient (client, server, port);
174
175
}
175
176
176
177
#if defined(ARDUINO_CELLULAR_BEARSSL)
177
178
HttpClient ArduinoCellular::getHTTPSClient (const char * server, const int port){
178
- return HttpClient (* new BearSSLClient (* new TinyGsmClient (modem)), server, port);
179
+ BearSSLClient client = getSecureNetworkClient ();
180
+ return HttpClient (client, server, port);
179
181
}
180
182
181
183
BearSSLClient ArduinoCellular::getSecureNetworkClient (){
182
- return BearSSLClient (* new TinyGsmClient (modem));
184
+ TinyGsmClient client = getNetworkClient ();
185
+ return BearSSLClient (client);
183
186
}
184
187
#endif
185
188
You can’t perform that action at this time.
0 commit comments