Skip to content

Conversation

c9s
Copy link
Owner

@c9s c9s commented Nov 14, 2024

No description provided.

@bbgokarma-bot
Copy link

Welcome back! @c9s, This pull request may get 914 BBG.

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 969 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 1039 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 1043 BBG

)

func getConnState(con *Connectivity) ConnectivityState {
state := ConnectivityStateDisconnected
Copy link
Collaborator

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?

Copy link
Owner Author

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

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 1066 BBG

@c9s c9s enabled auto-merge November 14, 2024 15:03
@c9s c9s requested a review from ycdesu November 14, 2024 15:07

case <-conn.disconnectedC:
return true
}
Copy link
Collaborator

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?

Copy link
Owner Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This copy is redundant?

Copy link
Owner Author

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

@c9s c9s merged commit 8791da6 into main Nov 14, 2024
3 checks passed
@c9s c9s deleted the c9s/fix-connectivity branch November 14, 2024 15:41
@bbgokarma-bot
Copy link

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!

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.

5 participants