Skip to content

Commit

Permalink
do not error if context is canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonNorthey92 committed Jul 19, 2024
1 parent 5c4c994 commit 33ed38e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/tbc/tbcfork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,9 @@ func waitForPort(ctx context.Context, port string) error {
for {
select {
case <-ctx.Done():
if errors.Is(ctx.Err(), context.Canceled) {
return nil
}
return ctx.Err()
case <-time.After(100 * time.Millisecond):
conn, err := net.DialTimeout("tcp", net.JoinHostPort("localhost", port), 100*time.Millisecond)
Expand Down

0 comments on commit 33ed38e

Please sign in to comment.