Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed server_keep_alive #144

Merged
merged 1 commit into from
Jan 19, 2023
Merged

fixed server_keep_alive #144

merged 1 commit into from
Jan 19, 2023

Conversation

mlaass
Copy link
Contributor

@mlaass mlaass commented Jan 18, 2023

When a server such as mochi MQTT sends a server_keep_alive property on CONNACK the handler would fail at "connection.py", line 108, in keepalive, trying to divide a list.
example output:

ERROR:gmqtt.mqtt.handler:[ERROR HANDLE PKG]
Traceback (most recent call last):
  File "/home/*********/handler.py", line 383, in __call__
    result = self._handle_packet(cmd, packet)
  File "/home/*********/handler.py", line 214, in _handle_packet
    handler(cmd, packet)
  File "/home/*********/handler.py", line 289, in _handle_connack_packet
    self._update_keepalive_if_needed()
  File "/home/*********/handler.py", line 257, in _update_keepalive_if_needed
    self._connection.keepalive = self._keepalive
  File "/home/*********/connection.py", line 108, in keepalive
    self._keep_connection_callback = asyncio.get_event_loop().call_later(self._keepalive / 2, self._keep_connection)
TypeError: unsupported operand type(s) for /: 'list' and 'int'

@Lenka42 Lenka42 merged commit 8961fa9 into wialon:master Jan 19, 2023
@sivaNbalusu5
Copy link

@Lenka42 @mlaass Can we have a new version with this fix, I am currently facing this issue.

@Lenka42
Copy link
Collaborator

Lenka42 commented Mar 9, 2023

@mlaass thanks for PR! @sivaNbalusu5 very sorry about the delay.
Guys, please check version 0.6.12, must be in Pypi already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants