fix race condition in gobCodec