Commit 03811a9
committed
modify serial read loop to handle port disconnection
if the port is open and gets detached Read() doesn't return error;
however, the function returns really fast so we can catch that event and signal a portClose
Former-commit-id: c4d4dc3430c14e97e1e27dca388a4344c5f6d8dc [formerly 0f2312236fa5ef9bacd583aa5ceb7c1c70f35604]
Former-commit-id: adf44041c3d77c15a073e58c5cad214d422564f41 parent 8adabc0 commit 03811a9
1 file changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
159 | | - | |
| 162 | + | |
160 | 163 | | |
161 | 164 | | |
162 | 165 | | |
| |||
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
174 | 188 | | |
175 | 189 | | |
176 | 190 | | |
| |||
0 commit comments