Description:
The Start method in ws/client.go contains a select {} statement at line 125, which causes the function to block forever. This behavior is misleading, since a method named Start is usually expected to launch background goroutines and return immediately, allowing callers to continue execution. Infinite blocking should not occur inside the method—shutdown logic should be managed externally.
Suggested Improvement:
Refactor Start so it does not block forever.
Remove or replace select {} with proper goroutine management.
Let Start return immediately after launching necessary goroutines.
Move blocking/wait/shutdown to the calling code if needed.
Reference:
Code location
Description:
The Start method in ws/client.go contains a select {} statement at line 125, which causes the function to block forever. This behavior is misleading, since a method named Start is usually expected to launch background goroutines and return immediately, allowing callers to continue execution. Infinite blocking should not occur inside the method—shutdown logic should be managed externally.
Suggested Improvement:
Refactor Start so it does not block forever.
Remove or replace select {} with proper goroutine management.
Let Start return immediately after launching necessary goroutines.
Move blocking/wait/shutdown to the calling code if needed.
Reference:
Code location