Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 31759bd

Browse filesBrowse files
committed
GSM: don't disconnect if not connected
1 parent 9ed95ad commit 31759bd
Copy full SHA for 31759bd

File tree

1 file changed

+6
-1
lines changed
Filter options

1 file changed

+6
-1
lines changed

‎libraries/GSM/src/GSM.cpp

Copy file name to clipboardExpand all lines: libraries/GSM/src/GSM.cpp
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,14 @@ void arduino::GSMClass::end() {
138138
}
139139

140140
int arduino::GSMClass::disconnect() {
141-
if (_context) {
141+
if (!_context) {
142+
return 0;
143+
}
144+
145+
if (_context->is_connected()) {
142146
return _context->disconnect();
143147
}
148+
144149
return 0;
145150
}
146151

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.