Skip to content

Commit 6107c7d

Browse files
author
Alec Gibson
committed
Remove Backend.connect callback overload
1 parent 2d81715 commit 6107c7d

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

lib/backend.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ Backend.prototype.close = function(callback) {
101101
};
102102

103103
Backend.prototype.connect = function(connection, req, callback) {
104-
if (typeof connection === 'function') {
105-
callback = connection;
106-
connection = undefined;
107-
}
108-
109104
var socket = new StreamSocket();
110105
if (connection) {
111106
connection.bindToSocket(socket);

test/client/connection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ describe('client connection', function() {
200200

201201
it('persists its id and seq when reconnecting', function(done) {
202202
var backend = this.backend;
203-
backend.connect(function(connection) {
203+
backend.connect(null, null, function(connection) {
204204
var id = connection.id;
205205
expect(id).to.be.ok;
206206
var doc = connection.get('test', '123');
@@ -218,7 +218,7 @@ describe('client connection', function() {
218218
});
219219

220220
it('errors when submitting an op with a very large seq', function(done) {
221-
this.backend.connect(function(connection) {
221+
this.backend.connect(null, null, function(connection) {
222222
var doc = connection.get('test', '123');
223223
doc.create({foo: 'bar'}, function(error) {
224224
if (error) return done(error);

test/client/submit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ module.exports = function() {
355355
});
356356

357357
it('op submitted during inflight create does not compose and gets flushed', function(done) {
358-
this.backend.connect(function(connection) {
358+
this.backend.connect(null, null, function(connection) {
359359
var doc = connection.get('dogs', 'fido');
360360
doc.create({age: 3});
361361
// Submit an op after message is sent but before server has a chance to reply
@@ -802,8 +802,8 @@ module.exports = function() {
802802

803803
it('snapshot fetch from query does not advance version of doc with pending ops', function(done) {
804804
var backend = this.backend;
805-
backend.connect(function(connection1) {
806-
backend.connect(function(connection2) {
805+
backend.connect(null, null, function(connection1) {
806+
backend.connect(null, null, function(connection2) {
807807
var doc = connection1.get('dogs', 'fido');
808808
var doc2 = connection2.get('dogs', 'fido');
809809
doc.create({name: 'kido'}, function(err) {

0 commit comments

Comments
 (0)