Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3f8508

Browse files
committed
close sendCh after sending stop response
1 parent bc5fe4e commit e3f8508

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

vpn/tunnel.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,7 @@ func (t *Tunnel) requestLoop() {
103103
if req.msg.Rpc != nil && req.msg.Rpc.MsgId != 0 {
104104
t.handleRPC(req)
105105
if _, ok := req.msg.GetMsg().(*ManagerMessage_Stop); ok {
106-
// TODO: Wait for the reply to be sent before closing the speaker.
107-
// err := t.speaker.Close()
108-
// if err != nil {
109-
// t.logger.Error(t.ctx, "failed to close speaker", slog.Error(err))
110-
// }
106+
close(t.sendCh)
111107
return
112108
}
113109
continue

0 commit comments

Comments
 (0)