Skip to content

Commit

Permalink
コスメ
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexa committed Dec 2, 2024
1 parent 9e08fa1 commit cb10a6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,7 @@ type opusChannel struct {
Error error
}

// func channelToIOReadCloser(ctx context.Context, ch chan []byte) io.ReadCloser {
func channelToIOReadCloser(ctx context.Context, ch chan opusChannel) io.ReadCloser {
func opusChannelToIOReadCloser(ctx context.Context, ch chan opusChannel) io.ReadCloser {
r, w := io.Pipe()

go func() {
Expand Down
2 changes: 1 addition & 1 deletion packet_dump_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (h *PacketDumpHandler) Handle(ctx context.Context, opusCh chan opusChannel)

r, w := io.Pipe()

reader := channelToIOReadCloser(ctx, opusCh)
reader := opusChannelToIOReadCloser(ctx, opusCh)

go func() {
f, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
Expand Down
2 changes: 1 addition & 1 deletion test_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (h *TestHandler) ResetRetryCount() int {
func (h *TestHandler) Handle(ctx context.Context, opusCh chan opusChannel) (*io.PipeReader, error) {
r, w := io.Pipe()

reader := channelToIOReadCloser(ctx, opusCh)
reader := opusChannelToIOReadCloser(ctx, opusCh)

go func() {
encoder := json.NewEncoder(w)
Expand Down

0 comments on commit cb10a6c

Please sign in to comment.