Skip to content
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.

Code questions #6

Open
lkrocek opened this issue Apr 25, 2019 · 0 comments
Open

Code questions #6

lkrocek opened this issue Apr 25, 2019 · 0 comments

Comments

@lkrocek
Copy link

lkrocek commented Apr 25, 2019

  1. Not clear to me why is this Client library sending pings on server. This should be part of server or if this lib is able to being as a server as well it should be switch automatically or by configuration, so for me it's doing an extra work which is not required, or was there some reason of this?

  1. Why it's sending so much? in which frozen land you need to do a ping-pong every 1 second once it's trafficless or should be configurable at least.

if m._ready_state = m.STATE.OPEN and uptime(0) - m._last_ping_time >= 1

  1. once we know connection is closed why we are waiting 30 seconds to dispatch close event, additionaly should be again in constant somewhere on start of file...

if m._ready_state = m.STATE.CLOSING and uptime(0) - m._started_closing >= 30

I could do PR with those changes but, want to be sure what is the reasons.

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

No branches or pull requests

1 participant