-
-
Notifications
You must be signed in to change notification settings - Fork 345
FIX: refactor and redesign connectivity #1817
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
Conversation
Welcome back! @c9s, This pull request may get 914 BBG. |
Re-estimated karma: this pull request may get 969 BBG |
Re-estimated karma: this pull request may get 1039 BBG |
Re-estimated karma: this pull request may get 1043 BBG |
) | ||
|
||
func getConnState(con *Connectivity) ConnectivityState { | ||
state := ConnectivityStateDisconnected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the default value be Unknown and add a disconnected else case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i later figured out that we can start with disconnected state
FIX: fix deposit time checking
Re-estimated karma: this pull request may get 1066 BBG |
|
||
case <-conn.disconnectedC: | ||
return true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to be blocked here forever? Any timeout required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need to remove the AnyDisconnected(), channel 會有 triggered once 的問題
g.setFlags(g.sumState) | ||
g.mu.Unlock() | ||
|
||
_con := con |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This copy is redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy 是故意留給 closure 用,我怕直接用 func argument 會有 side effect
Hi @c9s, Well done! 1121 BBG has been sent to your polygon wallet. Please check the following tx: https://polygonscan.com/tx/0x13c14509a525bb3b32935eeee2e5264a9ae85896de7c31446b9c3dd970de1154 Thank you for your contribution! |
No description provided.