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(){
166166}
167167
168168TinyGsmClient ArduinoCellular::getNetworkClient (){
169- return TinyGsmClient (modem);
169+ return TinyGsmClient (modem, 0 );
170170}
171171
172172HttpClient 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);
174175}
175176
176177#if defined(ARDUINO_CELLULAR_BEARSSL)
177178HttpClient 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);
179181}
180182
181183BearSSLClient ArduinoCellular::getSecureNetworkClient (){
182- return BearSSLClient (* new TinyGsmClient (modem));
184+ TinyGsmClient client = getNetworkClient ();
185+ return BearSSLClient (client);
183186}
184187#endif
185188
You can’t perform that action at this time.
0 commit comments