File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,6 @@ Backend.prototype.close = function(callback) {
101101} ;
102102
103103Backend . 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 ) ;
Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments