Fixed concurrency bug WinNT
Status: Beta
Brought to you by:
dcrowley
There was a bug in ES++ 0.6.1 where two or
more concurrent requests would crash the
HTTP SOAP server (I am using Windows NT).
I fixed this by moving the members m_transport,
m_response, m_request, m_writer, m_parser,
and m_respname out of the definition of
SOAPServerDispatch and into the body of
SOAPServerDispatch::Handle(SOAPServerTransport&
trans).
I also had to pass m_transport, m_response and
m_writer
to SOAPServerDispatch::WriteFault().
This seems to do the job!
Logged In: YES
user_id=309972
I experienced the same thing.
And it is caused by multiple threads accessing the same
SOAPServerDispatch instance. SOAPServerDispatch owns a the
following objects: a pointer to transport, response, request and
writer.
What happens is that the response object is being reset by the
first client thread, while the second client thread is filling it in.
The whole thing can be solved by having local instances for all
four (also the transport pointer, since it can be overwritten) inside
the handle method, and pass three of them as parameters to
WriteFault.
The second solution is less nice, it requires a mutex.
I implemented thsi solution is easysoap 0.3 and it worked
perfectly.