Archived
This forum has been archived. Please start a new discussion on GitHub.
SocketException
screen display:
.\ThreadPool.cpp:352: Ice::SocketException:
socket exception: WSAENOTSOCK
e:/src/test/test.exe: error: exception in `Ice.ThreadPool.Serv
er':
this codes:[in bool IceInternal::ThreadPool::run()]
while(true)
{
fd_set fdSet;
memcpy(&fdSet, &_fdSet, sizeof(fd_set));
int ret;
if(_timeout > 0)
{
struct timeval tv;
tv.tv_sec = _timeout;
tv.tv_usec = 0;
ret = ::select(_maxFd + 1, &fdSet, 0, 0, &tv);
}
else
{
ret = ::select(_maxFd + 1, &fdSet, 0, 0, 0);
//Exception
}
if(ret == SOCKET_ERROR)
{
if(interrupted())
{
continue;
}
SocketException ex(__FILE__, __LINE__);
ex.error = getSocketErrno();
//throw ex;
Error out(_instance->logger());
out << "exception in `" << _prefix << "':\n" << ex;
continue;
}
..........................
.\ThreadPool.cpp:352: Ice::SocketException:
socket exception: WSAENOTSOCK
e:/src/test/test.exe: error: exception in `Ice.ThreadPool.Serv
er':
this codes:[in bool IceInternal::ThreadPool::run()]
while(true)
{
fd_set fdSet;
memcpy(&fdSet, &_fdSet, sizeof(fd_set));
int ret;
if(_timeout > 0)
{
struct timeval tv;
tv.tv_sec = _timeout;
tv.tv_usec = 0;
ret = ::select(_maxFd + 1, &fdSet, 0, 0, &tv);
}
else
{
ret = ::select(_maxFd + 1, &fdSet, 0, 0, 0);
//Exception
}
if(ret == SOCKET_ERROR)
{
if(interrupted())
{
continue;
}
SocketException ex(__FILE__, __LINE__);
ex.error = getSocketErrno();
//throw ex;
Error out(_instance->logger());
out << "exception in `" << _prefix << "':\n" << ex;
continue;
}
..........................
0
Comments
-
I'm afraid you haven't given us much to go on.
Please supply:
- Ice version
- Platform
- Compiler
And when exactly this happens. If possible a full self-contained example that demonstrates this problem would help.
Regards, Matthew0 -
- Ice version:Ice-2.1.2
- Platform :windows 2000 server
- Compiler: vc++7.1
I use multi-client do logining from RPC to server , then the server send back message by ICEstrom,then clients exit unnormal.When we do this again and again,the exception happened only two times.
moreover why the function (::IceStorm::TopicPrx retrieve(const::std::string&);) can block frequently when doing the same action as above?
thanks and regards
yanhbo0 -
What is terminating with the SocketException? Your client? Without an example its hard to say what the problem could be... If you can narrow the problem down to a self-contained example we'd be more than happy to look into it for you.
With respect to IceStorm::TopicManager::retrieve blocking... there could be many reasons such as a network problem, or the IceStorm server host machine being slow. I would suggest turning on some tracing in IceStorm and looking at the output. For example, if you turn on protocol tracing (Ice.Trace.Protocol=1) you can see each of the protocol messages as they arrive.
Regards, Matthew0