This code:

        puts "closed?: %s" % @socket.closed?.to_s

        begin
            @socket.close
        rescue Exception => e
            return
        rescue IOError => e
            return
        rescue Errno => e
            return
        end

outputs this:

closed?: false
/Users/rakaur/Sources/wc/ruby/synapse/trunk/lib/xmppd/xmpp/stream.rb:231:in
`ioloop': stream closed (IOError)
	from /Users/rakaur/Sources/wc/ruby/synapse/trunk/lib/xmppd.rb:196:in `loop'
	from /Users/rakaur/Sources/wc/ruby/synapse/trunk/lib/xmppd.rb:196:in `ioloop'
	from ./bin/xmppd:20
praxis:trunk rakaur$

Latest stable Ruby (1.8.7-p72). I don't see how this is possible.
Google seems mostly silent on the matter unless you speak Japanese.

Any ideas?