# DRb and catching connection close

**URL:** <https://www.ruby-forum.com/t/drb-and-catching-connection-close/82661>\
**Category:** Ruby\
**Created:** [January 19, 2007, 5:12pm UTC](https://www.ruby-forum.com/t/drb-and-catching-connection-close/82661 "2007-01-19T17:12:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kwi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/77aa72/32.png) [@kwi](https://www.ruby-forum.com/u/kwi)\
**Post date:** [January 19, 2007, 5:12pm UTC](https://www.ruby-forum.com/t/drb-and-catching-connection-close/82661/1 "2007-01-19T17:12:18Z")

</div>

Hello,

I post here as i have a problem that i can’t fix with DRb, i made two  
(or more) servers connected together via DRb, and i want to catch the  
“connection close” event if a script bug or just exit.

Drb raise an exception internally, but in a thread, so i can’t catch it.  
And when the program try to contact a dead other one, it freezes,  
because it isn’t aware of the deconnection.

Do u have an idea for catching this event without modify DRb class ?

Thanks in advance.
