Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5163ed5

Browse files
committed
swap order of waiting for read and write
1 parent2611f51 commit5163ed5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎cli/trafficgen.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ func (r *RootCmd) trafficGen() *clibase.Cmd {
9696
close(wch)
9797
}()
9898

99-
ifrErr:=<-rch;rErr!=nil {
100-
returnxerrors.Errorf("read from pty: %w",rErr)
101-
}
10299
ifwErr:=<-wch;wErr!=nil {
103100
returnxerrors.Errorf("write to pty: %w",wErr)
104101
}
102+
ifrErr:=<-rch;rErr!=nil {
103+
returnxerrors.Errorf("read from pty: %w",rErr)
104+
}
105105

106106
_,_=fmt.Fprintf(inv.Stdout,"Test results:\n")
107107
_,_=fmt.Fprintf(inv.Stdout,"Took: %.2fs\n",time.Since(start).Seconds())

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp