                 r.send(a[0])
         r.onclose = (e) ->
             if a.length
-                ok(false, "Transport closed prematurely.")
+                ok(false, "Transport closed prematurely. " + e)
             else
-                log('onclose ' + e)
                 ok(true)
             start()
 

            if counter is messages.length
                r.close()
        r.onclose = (e) ->
            ok(true)
            start()

factor_batch_large = (protocol) ->

    # Should be larger than 128k - the limit for a single request in
    # some streaming transports.
    messages = [
        Array(Math.pow(2,1)).join('x'),
        Array(Math.pow(2,2)).join('x'),
        Array(Math.pow(2,4)).join('x'),
        Array(Math.pow(2,8)).join('x'),
        Array(Math.pow(2,16)).join('x'),
        Array(Math.pow(2,17)).join('x'),
        Array(Math.pow(2,18)).join('x'),
    ]
    return echo_factory_factory(protocol, messages)
