Skip to content

client isConnected [possible BUG] #55

Description

@Schrolli91

The client will check his connect status by send a packet with <keep-alive>.
But its possible that the client will spam this packet to the server instance.
We should take a network record (wireshark) and check how many packets are sent by this mechanism.

There is also a problem with the error handling if received data are broken:

20.09.2020 21:25:01,286 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### recv header: '12        '
20.09.2020 21:25:01,287 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### recv 10 bytes:

<keep-aliv
20.09.2020 21:25:01,287 - Thread-6        server          handle             [DEBUG   ] Add data to queue
20.09.2020 21:25:01,288 - Thread-6        server          handle             [DEBUG   ] Thread-6 192.168.192.### send: [ack]
20.09.2020 21:25:01,290 - Thread-6        server          handle             [INFO    ] Client disconnected: 192.168.192.###
20.09.2020 21:25:01,367 - MainThread      bw_server       <module>           [INFO    ] get data from 192.168.192.### (waited in queue 0.079 sec.)
20.09.2020 21:25:01,368 - MainThread      bw_server       <module>           [DEBUG   ] 0 packet(s) still waiting in queue
20.09.2020 21:25:01,368 - MainThread      packet          init           [DEBUG   ] create bwPacket from string
20.09.2020 21:25:01,368 - MainThread      bw_server       <module>           [ERROR   ] BOSWatch interrupted by an error
Traceback (most recent call last):
  File "bw_server.py", line 101, in <module>
    bwPacket = Packet((data[1]))
  File "/opt/boswatch3/boswatch/packet.py", line 35, in init
    self._packet = eval(str(bwPacket.strip()))
  File "<string>", line 1
    <keep-aliv
    ^
SyntaxError: invalid syntax
20.09.2020 21:25:01,370 - MainThread      bw_server       <module>           [DEBUG   ] Starting shutdown routine

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions