Skip to content

Commit

Permalink
Catch TryAgain Socket Exceptions when waiting for postgres in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Oct 29, 2024
1 parent 135954f commit a8ac83e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/LexData/DbStartupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ private async Task<bool> TryMigrate(DbContext dbContext, CancellationToken cance
{
return false;
}
catch (SocketException ex) when (ex.SocketErrorCode == SocketError.TryAgain)
{
return false;
}
}

public Task StopAsync(CancellationToken cancellationToken)
Expand Down

0 comments on commit a8ac83e

Please sign in to comment.