[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] error message: SC_UdpInPort: received error - An existing connection was forcibly closed by the remote host
On Fri, Mar 8, 2019 at 2:35 AM <wondersluyter@xxxxxxxxx> wrote:
> Hello, I'm currently migrating some code from OSX to Win 10 and have run into the same error message, but only when I try to send OSC to a port that is not currently open (given the nature of the project, I can't guarantee that the port will be open always, it should fail silently if it's not). I've enclosed the code in a try {} block, which has no effect in catching the error. Turning off IPv6 in windows network settings reduces the number of error messages from roughly a bazillion down to one, which is a positive step.
Grepping the source code, it's happening in one of these two places:
./lang/LangPrimSource/SC_ComPort.cpp:123: printf("SC_UdpInPort:
received error - %s\n", error.message().c_str());
./server/scsynth/SC_ComPort.cpp:216: printf("SC_UdpInPort:
received error - %s", error.message().c_str());
The receive-UDP function is called directly from a communication
socket object, so it's possible that the socket simply calls this
function for any type of error (sending or receiving).
```
void SC_UdpInPort::handleReceivedUDP(const boost::system::error_code& error,
std::size_t bytesTransferred)
{
double timeReceived = elapsedTime(); // get time now to minimize
jitter due to lang load
if (error == boost::asio::error::operation_aborted)
return; /* we're done */
if (error == boost::asio::error::connection_refused) {
// avoid windows error message
startReceiveUDP();
return;
}
if (error) {
printf("SC_UdpInPort: received error - %s\n", error.message().c_str());
startReceiveUDP();
return;
}
... snip ...
}
```
We're already ignoring two errors. So I guess Windows is throwing up
some other spurious error code that doesn't happen on other platforms.
Can you log this as a bug?
FWIW I've also seen this error when recompiling the class library.
hjh
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/