|
|
@@ -10,7 +10,7 @@ import (
|
|
10
|
10
|
|
|
11
|
11
|
func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.Conn) {
|
|
12
|
12
|
defer telegramConn.Close() //nolint: errcheck
|
|
13
|
|
- defer clientConn.Close() //nolint: errcheck
|
|
|
13
|
+ defer clientConn.Close() //nolint: errcheck
|
|
14
|
14
|
|
|
15
|
15
|
ctx, cancel := context.WithCancel(ctx)
|
|
16
|
16
|
defer cancel()
|
|
|
@@ -18,7 +18,7 @@ func Relay(ctx context.Context, log Logger, telegramConn, clientConn essentials.
|
|
18
|
18
|
go func() {
|
|
19
|
19
|
<-ctx.Done()
|
|
20
|
20
|
telegramConn.Close() //nolint: errcheck
|
|
21
|
|
- clientConn.Close() //nolint: errcheck
|
|
|
21
|
+ clientConn.Close() //nolint: errcheck
|
|
22
|
22
|
}()
|
|
23
|
23
|
|
|
24
|
24
|
closeChan := make(chan struct{})
|