Re: Disconnecting a client



Michael Bell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Dan Winship wrote:
> 
>> That points to some sort of memory-handling error; something's getting
>> freed twice or something. Where exactly does it crash? And does running
>> under valgrind tell you anything?
> 
> Yes, I found a problem with Valgrind but I don't understand it. My
> interpretation is that soup_session_queue_message already cleaned up
> session. I simply don't understand why. The same code with libsoup 2.2
> works perfectly.
> 
...
> 
> I hope this gives some more details to you.

Yup, the problem is that SoupSessionAsync is not thread-safe, but you're
queuing messages from the main thread and having them be run in the
client_thread. If you change the code so that the
soup_session_queue_message() call happens in client_thread, then it will
work fine.

-- Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]