Skip to content

Commit

Permalink
fix race
Browse files Browse the repository at this point in the history
  • Loading branch information
Termina1 committed Dec 13, 2024
1 parent 9e00455 commit ffb771d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ func (sync *Syncer) Drain(ctx context.Context, recs protocol.Records) (err error

recs = sync.processPings(recs)

switch sync.drainState {
switch sync.GetDrainState() {
case SendHandshake:
if len(recs) == 0 {
return ErrBadHPacket
Expand Down

0 comments on commit ffb771d

Please sign in to comment.