         @stop()
 
     stop : () ->
+        @expect = null
         @expectStartTime = null
         @stopped = true
-        @socket?.removeAllListeners()
-        @socket?.disconnect()
+        # do not disconnect right away, continue counting server side events
         @emit('stopped')
 
     toJSON : ()->

process.on('SIGTERM',()->
    if clientProcess and not benchmarkFinished
        reportStats(clientProcess.stats.report2())
        resultLogger "terminated"
        process.exit(1)
)
                setTimeout(fireNextEvent, waitDuration)

    _serverEventHandler : (eventName, args)->
        logger("eventName #{eventName} #{JSON.stringify(args)}")
        @stats.addCounter('serverEvent')
        return if @stopped
        # dosomething special for batch events....
        if eventName is 'batch'
            batchedEvents = args[0]
