{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/590","repository_url":"https://api.github.com/repos/eclipse/paho.mqtt.c","labels_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/590/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/590/comments","events_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/590/events","html_url":"https://github.com/eclipse/paho.mqtt.c/issues/590","id":387715998,"node_id":"MDU6SXNzdWUzODc3MTU5OTg=","number":590,"title":"Client times out with keep alive interval of 1s","user":{"login":"blues-breaker","id":26068676,"node_id":"MDQ6VXNlcjI2MDY4Njc2","avatar_url":"https://avatars1.githubusercontent.com/u/26068676?v=4","gravatar_id":"","url":"https://api.github.com/users/blues-breaker","html_url":"https://github.com/blues-breaker","followers_url":"https://api.github.com/users/blues-breaker/followers","following_url":"https://api.github.com/users/blues-breaker/following{/other_user}","gists_url":"https://api.github.com/users/blues-breaker/gists{/gist_id}","starred_url":"https://api.github.com/users/blues-breaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blues-breaker/subscriptions","organizations_url":"https://api.github.com/users/blues-breaker/orgs","repos_url":"https://api.github.com/users/blues-breaker/repos","events_url":"https://api.github.com/users/blues-breaker/events{/privacy}","received_events_url":"https://api.github.com/users/blues-breaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-12-05T11:35:51Z","updated_at":"2018-12-06T13:15:07Z","closed_at":null,"author_association":"NONE","body":"When connecting a client with a keep alive interval of one second the client does not seem to send PINGREQs at the required rate.\r\n\r\nThis results in the broker disconnecting the client.\r\n\r\nMosquitto in verbose mode prints: `Client <client name> has exceeded timeout, disconnecting`.\r\n\r\nThe Python Paho library can connect a client with 1s keep alive interval without issue, so I think the broker can be ruled out initially.\r\n\r\nI first encountered this problem using the paho C++ library, I then modified the MQTTClient_publish.c example program to see if the issue also existed in the C library.\r\n\r\nApplying the fix mentioned in #570 did not solve the issue either.\r\n\r\nPlease find attached test program to reproduce the issue along with a trace file. \r\n[C_keep_alive_test.zip](https://github.com/eclipse/paho.mqtt.c/files/2648625/C_keep_alive_test.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/comments/444866736","html_url":"https://github.com/eclipse/paho.mqtt.c/issues/590#issuecomment-444866736","issue_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/590","id":444866736,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDg2NjczNg==","user":{"login":"icraggs","id":10279016,"node_id":"MDQ6VXNlcjEwMjc5MDE2","avatar_url":"https://avatars1.githubusercontent.com/u/10279016?v=4","gravatar_id":"","url":"https://api.github.com/users/icraggs","html_url":"https://github.com/icraggs","followers_url":"https://api.github.com/users/icraggs/followers","following_url":"https://api.github.com/users/icraggs/following{/other_user}","gists_url":"https://api.github.com/users/icraggs/gists{/gist_id}","starred_url":"https://api.github.com/users/icraggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icraggs/subscriptions","organizations_url":"https://api.github.com/users/icraggs/orgs","repos_url":"https://api.github.com/users/icraggs/repos","events_url":"https://api.github.com/users/icraggs/events{/privacy}","received_events_url":"https://api.github.com/users/icraggs/received_events","type":"User","site_admin":false},"created_at":"2018-12-06T13:15:07Z","updated_at":"2018-12-06T13:15:07Z","author_association":"CONTRIBUTOR","body":"difftime() returns a result in seconds, and the lowest retryLoopInterval can go is 1, so changing > to >= seems like the right thing to do, and of course is simple :-).   It can be added to the next release."}}
{"actor":{"display_login":"icraggs"}}