()
| 316 | } |
| 317 | |
| 318 | public void run() |
| 319 | { |
| 320 | while(running) |
| 321 | { |
| 322 | try |
| 323 | { |
| 324 | String message = connection.readMessage(); |
| 325 | |
| 326 | if(message == null) |
| 327 | { |
| 328 | disconnect(); |
| 329 | } |
| 330 | else |
| 331 | { |
| 332 | handleMessage(message); |
| 333 | |
| 334 | if(checkStayAliveTime()) |
| 335 | { |
| 336 | sendKeepAlive(); |
| 337 | } |
| 338 | } |
| 339 | } |
| 340 | catch (SocketTimeoutException e) |
| 341 | { |
| 342 | if(checkTimeout()) |
| 343 | { |
| 344 | disconnect(); |
| 345 | } |
| 346 | else |
| 347 | { |
| 348 | sendKeepAlive(); |
| 349 | } |
| 350 | } |
| 351 | catch (IOException e) |
| 352 | { |
| 353 | e.printStackTrace(); |
| 354 | |
| 355 | disconnect(); |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | } |
nothing calls this directly
no test coverage detected