()
| 602 | } |
| 603 | |
| 604 | public void run() |
| 605 | { |
| 606 | while(running) |
| 607 | { |
| 608 | try |
| 609 | { |
| 610 | String message = connection.readMessage(); |
| 611 | |
| 612 | if(message == null) |
| 613 | { |
| 614 | disconnect(true); |
| 615 | } |
| 616 | else |
| 617 | { |
| 618 | handleMessage(message); |
| 619 | |
| 620 | if(checkStayAliveTime()) |
| 621 | { |
| 622 | sendKeepAlive(); |
| 623 | } |
| 624 | } |
| 625 | } |
| 626 | catch (SocketTimeoutException e) |
| 627 | { |
| 628 | if(checkTimeout()) |
| 629 | { |
| 630 | disconnect(true); |
| 631 | } |
| 632 | else |
| 633 | { |
| 634 | sendKeepAlive(); |
| 635 | } |
| 636 | } |
| 637 | catch (IOException e) |
| 638 | { |
| 639 | e.printStackTrace(); |
| 640 | |
| 641 | disconnect(true); |
| 642 | } |
| 643 | } |
| 644 | } |
| 645 | } |
nothing calls this directly
no test coverage detected