File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,6 @@ class SMDevice : private mbed::NonCopyable<SMDevice>,
127
127
} else {
128
128
printf (" Pairing failed\r\n " );
129
129
}
130
-
131
- /* disconnect in 500 ms */
132
- _event_queue.call_in (
133
- 500 , &_ble.gap (),
134
- &Gap::disconnect, _handle, Gap::REMOTE_USER_TERMINATED_CONNECTION
135
- );
136
130
}
137
131
138
132
/* * Inform the application of change in encryption status. This will be
@@ -148,6 +142,12 @@ class SMDevice : private mbed::NonCopyable<SMDevice>,
148
142
} else if (result == ble::link_encryption_t ::NOT_ENCRYPTED) {
149
143
printf (" Link NOT_ENCRYPTED\r\n " );
150
144
}
145
+
146
+ /* disconnect in 2 s */
147
+ _event_queue.call_in (
148
+ 2000 , &_ble.gap (),
149
+ &Gap::disconnect, _handle, Gap::REMOTE_USER_TERMINATED_CONNECTION
150
+ );
151
151
}
152
152
153
153
private:
You can’t perform that action at this time.
0 commit comments