`client_list` is a global (per controller class) array and you seem to be modifying it concurrently. Ruby's `Array`s are not thread safe, you must wrap all code that accesses `client_list` (both read & writes) into a per-controller mutex.