SN-10225 附来源、原文与上下文。
我想我已经修复了与“select failed: 10038”(WSAENOTSOCK 错误)有关的问题。select 出错本身不是大问题,但它导致通信线程阻塞在一个套接字上;这个套接字本该处于非阻塞模式,却没有正确设置。这个问题以前一直没有暴露,是因为只要 select 没有失败,只有在有数据可读时才会调用 receive。
I believe I've fixed the bug related to "select failed: 10038" (error WSAENOTSOCK). The select error is not a big deal, but it led the communications thread to get blocked on a socket that should have been in non-blocking mode but wasn't. It never came up until now because as long as select never failed, receive would never be called unless there was data.
如果不修复这个问题,你的节点有时就会停止通信。连接仍会建立,但不会传送数据。生成的区块很可能不会被接受,因为你无法把它们广播出去,其他节点会把你的分支甩在后面。这就是没有网络连接时 Generate(生成比特币)不运行的原因。
Without this fix, your node's communication sometimes goes dead. Connections are still made, but no data is passed. Any generated blocks would probably not be accepted since you can't broadcast them and other nodes will leave your branch behind. That's why Generate doesn't run when you're not connected.
这也可能是 bitcoin.exe 无法退出的原因。关闭程序时没有理由等待通信线程,因此我把它改成只等待消息处理线程。以后我会再做更彻底的强制关闭处理。
This could also have caused bitcoin.exe to fail to exit. There's no reason for shutdown to wait for the com thread, so I made it only wait for the message processing thread. I'll do a more thorough forced shutdown later.
看起来你的节点的通信线程刚刚又被这个问题阻塞了。这次它运行了几个小时才出问题。
Looks like your node's com thread just now got blocked on this bug again. It went for a few hours this time before it did.
随信附上 0.1.3 版 exe。
Version 0.1.3 exe attached.