Refactor ctxrw to wrappers

This commit is contained in:
9seconds
2018-06-05 10:50:57 +03:00
parent 4486fbb8f4
commit 65f8e2ac30
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -126,7 +126,7 @@ func (s *Server) getClientStream(ctx context.Context, cancel context.CancelFunc,
wConn = newLogReadWriteCloser(wConn, s.logger, socketID, "client")
wConn = wrappers.NewStreamCipherRWC(wConn, obfs2.Encryptor, obfs2.Decryptor)
wConn = newCtxReadWriteCloser(ctx, cancel, wConn)
wConn = wrappers.NewCtxRWC(ctx, cancel, wConn)
return wConn, dc, nil
}
@@ -146,7 +146,7 @@ func (s *Server) getTelegramStream(ctx context.Context, cancel context.CancelFun
wConn = newLogReadWriteCloser(wConn, s.logger, socketID, "telegram")
wConn = wrappers.NewStreamCipherRWC(wConn, obfs2.Encryptor, obfs2.Decryptor)
wConn = newCtxReadWriteCloser(ctx, cancel, wConn)
wConn = wrappers.NewCtxRWC(ctx, cancel, wConn)
return wConn, nil
}