Re: [gnet-dev] gnet-win32 message callback

--On Wednesday, May 09, 2001 2:30 PM -0700 wroberts1 home com wrote:

Another issue that comes up is the iochannel watch thread on a
tcp server socket not being freed, when socket is closed.
I cant yet tell if its a glib-win32 problem or a gnet-win32 problem.
It seems to lean towards giowin32.

When peer of a tcp server socket closes the connection, g_io_win32_free()
never gets called because the iochannel ref_count never reaches zero.
It is an issue, because after several times of connecting and
disconnecting there will be orphaned watch threads eating up buffer
space. Eventually the giowin32.c:create_thread() will fail with buffer
space error.

I have verified that it works properly in linux, the iochannel ref_count
does reach zero and iochannel is freed.  In win32, the ref_count ends
up at two. I find it difficult to track down, between the
g_io_msg_create_watch, g_io_win32_create_watch, select_thread

I'll look into this. It is most likely in the new version of Glib since it's socket code is completely rewritten. I have run into the exact same problem before, and made the change in GNet late last year.


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