# In GServer will socket will be closed when Thread.exit?

**URL:** <https://www.ruby-forum.com/t/in-gserver-will-socket-will-be-closed-when-thread-exit/141106>\
**Category:** Ruby\
**Created:** [June 22, 2008, 3:36am UTC](https://www.ruby-forum.com/t/in-gserver-will-socket-will-be-closed-when-thread-exit/141106 "2008-06-22T03:36:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [June 22, 2008, 3:36am UTC](https://www.ruby-forum.com/t/in-gserver-will-socket-will-be-closed-when-thread-exit/141106/1 "2008-06-22T03:36:30Z")

</div>

Hi, using GServer if I close the Thread into “server” method:

def serve(io)  
Thread.exit  
end

will be the ‘io’ socket be also terminated? or will be remain in memory?

Thanks.
