Commit 5532927e authored by Alexandre Julliard's avatar Alexandre Julliard

server: Make sure a thread doesn't get freed while it's processing a request.

parent 39d54523
......@@ -248,9 +248,11 @@ static void thread_poll_event( struct fd *fd, int event )
struct thread *thread = get_fd_user( fd );
assert( thread->obj.ops == &thread_ops );
grab_object( thread );
if (event & (POLLERR | POLLHUP)) kill_thread( thread, 0 );
else if (event & POLLIN) read_request( thread );
else if (event & POLLOUT) write_reply( thread );
release_object( thread );
}
/* cleanup everything that is no longer needed by a dead thread */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment