简体   繁体   English

TTL> 1时,组播socket.close需要3分钟

[英]Multicast socket.close takes 3 minutes with TTL>1

On certain Windows machines, I'm seeing a multicast socket.close call take ~3 minutes. 在某些Windows机器上,我看到一个多播socket.close调用大约需要3分钟。

This is reproducible in both Java and .NET across various different kinds of NICs and Windows flavors. 这在Java和.NET中可以在各种不同类型的NIC和Windows风格中重现。

It's not reproducible on most machines, but the ones that have it seem to follow the same pattern. 它在大多数机器上都不具有可重现性,但具有它的机器似乎遵循相同的模式。 A TTL>1 causes the 3 minute socket.close and any TTL==1 seems to close the socket almost instantly. TTL> 1导致3分钟socket.close,任何TTL == 1似乎几乎立即关闭套接字。

My questions are is anyone else seeing this issue and does anyone know why it's happening? 我的问题是其他人看到这个问题,有谁知道为什么会这样?

I think I've solved the mystery of Socket.Close() taking 3 minutes to complete when using a multicast TTL>1: It occurs every time the routing and RAS service (RRAS) has been started. 我认为,当使用多播TTL> 1时,我已经解决了Socket.Close()的神秘感,需要3分钟才能完成:每次启动路由和RAS服务(RRAS)时都会发生这种情况。 This KB entry explains it and gives a hotfix: http://support.microsoft.com/kb/2555948/en-us 此KB条目解释它并提供了一个修补程序: http//support.microsoft.com/kb/2555948/en-us

Using netsh interface ipv4 set global multicastforwarding=disabled in an admin shell brings Socket.Close() time back to normal. 在管理shell中使用netsh interface ipv4 set global multicastforwarding=disabled会使Socket.Close()时间恢复正常。

Yeah, I can confirm this. 是的,我可以证实这一点。 Same behavior in C++ on Windows 7 on UDP sockets. UDP套接字上的Windows 7上的C ++中的相同行为。 I've discovered that not joining the same multicast group you are sending to solves the problem on my project. 我发现没有加入你发送的同一个多播组来解决我项目中的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM