Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func createApp(

// syncLog syncs the log to the specific output at the end of the program.
func syncLog(log logger.Logger) {
if err := log.Sync(); err != nil && !errors.Is(err, syscall.ENOTTY) {
if err := log.Sync(); err != nil && !errors.Is(err, syscall.ENOTTY) && !errors.Is(err, syscall.EINVAL) {
fmt.Fprintf(os.Stderr, "failed to sync logs: %v\n", err)
}
}
2 changes: 1 addition & 1 deletion relayer/chains/evm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func (c *client) getClientWithMaxHeight(ctx context.Context) (ClientConnectionRe
for i := 0; i < len(c.Endpoints); i++ {
r := <-ch
if r.Client != nil {
if r.BlockHeight > result.BlockHeight {
if r.BlockHeight > result.BlockHeight || (r.Endpoint == c.selectedEndpoint && r.BlockHeight == result.BlockHeight) {
if result.Client != nil {
result.Client.Close()
}
Expand Down
Loading