diff --git a/stream.js b/stream.js index 9328589..d138eea 100644 --- a/stream.js +++ b/stream.js @@ -72,10 +72,6 @@ function WebSocketStream(target, protocols, options) { // was already open when passed in if (socket.readyState === socket.OPEN) { stream = proxy - } else if (isBrowser) { - stream = proxy - stream.cork() - socket.onopen = onopenBrowser } else { stream = duplexify.obj() socket.onopen = onopen @@ -135,11 +131,6 @@ function WebSocketStream(target, protocols, options) { stream.emit('connect') } - function onopenBrowser () { - stream.uncork() - stream.emit('connect') - } - function onclose() { stream.end() stream.destroy() diff --git a/test-client.js b/test-client.js index a2c75fd..b5ada2c 100644 --- a/test-client.js +++ b/test-client.js @@ -59,16 +59,3 @@ test('coerce client data as binary', function(t) { }) stream.write('hello') }) -test('cork logic test', function (t) { - var stream = ws('ws://localhost:8343', { binary: true }) - stream.on('data', function(o) { - t.equal(o.toString(), 'hello', 'success!') - stream.destroy() - t.end() - }) - stream.cork() - stream.write('he') - stream.write('l') - stream.write('lo') - stream.uncork() -}) \ No newline at end of file