File tree 1 file changed +1
-2
lines changed
Examples/MAUI-gRPC/AntGrpcService/Services
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ public class DiscoveryService(ILogger<DiscoveryService> logger) : BackgroundServ
12
12
13
13
protected override async Task ExecuteAsync ( CancellationToken stoppingToken )
14
14
{
15
- _logger . LogInformation ( "DiscoveryService running. Multicast group {GroupAddress}" , grpAddress . ToString ( ) ) ;
16
-
17
15
// create IPv4 UDP client
18
16
IPAddress ? localIPAddress = Dns . GetHostAddresses ( Dns . GetHostName ( ) ) . Where ( a => a . AddressFamily == AddressFamily . InterNetwork ) . FirstOrDefault ( ) ;
19
17
if ( localIPAddress == null )
@@ -28,6 +26,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
28
26
{
29
27
// join multicast group
30
28
udpClient . JoinMulticastGroup ( grpAddress ) ;
29
+ _logger . LogInformation ( "DiscoveryService running. Listening on {LocalIp}." , udpClient . Client . LocalEndPoint ! . ToString ( ) ) ;
31
30
32
31
// Loop listening for service requests. UDP is not reliable and multiple clients may request access to service.
33
32
while ( ! stoppingToken . IsCancellationRequested )
You can’t perform that action at this time.
0 commit comments