Skip to content

Commit b2d0448

Browse files
setting timeout before send command
1 parent 31114ba commit b2d0448

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

features/cellular/framework/targets/UBLOX/AT/UBLOX_AT_CellularStack.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,14 @@ nsapi_error_t UBLOX_AT_CellularStack::gethostbyname(const char *host, SocketAddr
449449
if (address->set_ip_address(host)) {
450450
err = NSAPI_ERROR_OK;
451451
} else {
452-
// This interrogation can sometimes take longer than the usual 8 seconds
453-
_at.cmd_start_stop("+UDNSRN", "=0,", "%s", host);
454452
#ifdef TARGET_UBLOX_C030_R41XM
455453
_at.set_at_timeout(70000);
456454
#else
457455
_at.set_at_timeout(120000);
458456
#endif
457+
// This interrogation can sometimes take longer than the usual 8 seconds
458+
_at.cmd_start_stop("+UDNSRN", "=0,", "%s", host);
459+
459460
_at.resp_start("+UDNSRN:");
460461
if (_at.info_resp()) {
461462
_at.read_string(ipAddress, sizeof(ipAddress));

0 commit comments

Comments
 (0)