Skip to content

Commit

Permalink
A few hacks to enable testing using CometD stress testing tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Apr 3, 2010
1 parent 0fa86cf commit 929c33f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/faye.js
Expand Up @@ -1025,7 +1025,7 @@ Faye.Server = Faye.Class({
if (!message.version)
response.error = Faye.Error.parameterMissing('version');

var clientConns = message.supportedConnectionTypes,
var clientConns = message.supportedConnectionTypes || ['long-polling'],
commonConns;

if (!local) {
Expand Down
2 changes: 1 addition & 1 deletion examples/node/app.js
Expand Up @@ -5,7 +5,7 @@ var fs = require('fs'),
faye = require('./faye');

var PUBLIC_DIR = path.dirname(__filename) + '/../shared/public',
comet = new faye.NodeAdapter({mount: '/comet', timeout: 45}),
comet = new faye.NodeAdapter({mount: '/cometd', timeout: 5}),

port = process.ARGV[2] || '8000';

Expand Down
2 changes: 1 addition & 1 deletion examples/rack/config.ru
Expand Up @@ -3,6 +3,6 @@ dir = File.dirname(__FILE__)
require dir + '/../../lib/faye'
require dir + '/app'

use Faye::RackAdapter, :mount => '/comet', :timeout => 25
use Faye::RackAdapter, :mount => '/cometd', :timeout => 5
run Sinatra::Application

2 changes: 1 addition & 1 deletion javascript/server.js
Expand Up @@ -112,7 +112,7 @@ Faye.Server = Faye.Class({
if (!message.version)
response.error = Faye.Error.parameterMissing('version');

var clientConns = message.supportedConnectionTypes,
var clientConns = message.supportedConnectionTypes || ['long-polling'],
commonConns;

if (!local) {
Expand Down
2 changes: 1 addition & 1 deletion lib/faye/server.rb
Expand Up @@ -104,7 +104,7 @@ def handshake(message, local = false)
unless local
response['supportedConnectionTypes'] = CONNECTION_TYPES

client_conns = message['supportedConnectionTypes']
client_conns = message['supportedConnectionTypes'] || ['long-polling']
if client_conns
common_conns = client_conns.select { |c| CONNECTION_TYPES.include?(c) }
response['error'] = Error.conntype_mismatch(*client_conns) if common_conns.empty?
Expand Down

0 comments on commit 929c33f

Please sign in to comment.