-
Notifications
You must be signed in to change notification settings - Fork 0
Use timeout duration of connection attempt according to connection type #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17 +/- ##
=======================================
Coverage 90.15% 90.15%
=======================================
Files 7 7
Lines 691 691
Branches 83 83
=======================================
Hits 623 623
Misses 68 68 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Memory usage change @ 7df59d7
Click for full report table
Click for full report CSV
|
switch (_networkSetting.type) { | ||
#if defined(BOARD_HAS_WIFI) | ||
case NetworkAdapter::WIFI: | ||
timeout = 15000; // 15 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 15000; // 15 seconds | |
timeout = NC_CONNECTION_TIMEOUT_ms; // 15 seconds |
|
||
#if defined(BOARD_HAS_ETHERNET) | ||
case NetworkAdapter::ETHERNET: | ||
timeout = 15000; // 15 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 15000; // 15 seconds | |
timeout = NC_CONNECTION_TIMEOUT_ms; // 15 seconds |
|
||
#if defined(BOARD_HAS_LORA) | ||
case NetworkAdapter::LORA: | ||
timeout 15000; // 15 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout 15000; // 15 seconds | |
timeout NC_CONNECTION_TIMEOUT_ms; // 15 seconds |
break; | ||
#endif | ||
default: | ||
timeout = 15000; // Default to 15 seconds for other adapters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 15000; // Default to 15 seconds for other adapters | |
timeout = NC_CONNECTION_TIMEOUT_ms; // Default to 15 seconds for other adapters |
|
||
#if defined(BOARD_HAS_CELLULAR) | ||
case NetworkAdapter::CELL: | ||
timeout = 30000; // 30 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 30000; // 30 seconds | |
timeout = 2 * NC_CONNECTION_TIMEOUT_ms; // 30 seconds |
|
||
#if defined(BOARD_HAS_CATM1_NBIOT) | ||
case NetworkAdapter::CATM1: | ||
timeout = 30000; // 30 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 30000; // 30 seconds | |
timeout = 2 * NC_CONNECTION_TIMEOUT_ms; // 30 seconds |
|
||
#if defined(BOARD_HAS_GSM) | ||
case NetworkAdapter::GSM: | ||
timeout = 30000; // 30 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 30000; // 30 seconds | |
timeout = 2 * NC_CONNECTION_TIMEOUT_ms; // 30 seconds |
|
||
#if defined(BOARD_HAS_NB) | ||
case NetworkAdapter::NB: | ||
timeout = 30000; // 30 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout = 30000; // 30 seconds | |
timeout = 2 * NC_CONNECTION_TIMEOUT_ms; // 30 seconds |
Set the timeout duration of a connection attempt according to the configured connectivity type