Refactored connection shutdown logic.

This commit is contained in:
Jay
2026-04-19 09:29:12 -04:00
parent 72f0793047
commit 6998ccf701
7 changed files with 175 additions and 161 deletions
-2
View File
@@ -50,7 +50,6 @@ func TestConnectionSend(t *testing.T) {
for {
select {
case msg := <-outgoingData:
fmt.Printf("got message %s\n", string(msg.Data))
mu.Lock()
messages = append(messages, string(msg.Data))
mu.Unlock()
@@ -69,7 +68,6 @@ func TestConnectionSend(t *testing.T) {
defer wg.Done()
for j := 0; j < 10; j++ {
data := []byte(fmt.Sprintf("msg-%d-%d", id, j))
fmt.Printf("sending message %s\n", string(data))
for {
// send and retry until success
err := conn.Send(data)