# Why Mongrel doesn't cancel connection on error?

**URL:** <https://www.ruby-forum.com/t/why-mongrel-doesnt-cancel-connection-on-error/171761>\
**Category:** Mongrel\
**Created:** [July 8, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/why-mongrel-doesnt-cancel-connection-on-error/171761 "2009-07-08T19:27:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [July 8, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/why-mongrel-doesnt-cancel-connection-on-error/171761/1 "2009-07-08T19:27:32Z")

</div>

Why Mongrel doesn’t cancel connection on error?

Example: (Mongrel using Rack)

…  
def call env  
begin  
p :start  
sleep 10  
ensure  
p :stop  
end  
end  
…

Open browser, go to localhost:8080, and immediatelly close the browser.  
Output will be:

start  
\<waits for 10 sec\>  
end

Why it doesn’t cancel/kill thread immediatelly?
