Browse Source

writeable -> writable

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
f323f34353
  1. 12
      lib/fs.js
  2. 2
      lib/net.js

12
lib/fs.js

@ -814,7 +814,7 @@ var WriteStream = fs.WriteStream = function(path, options) {
this.path = path;
this.fd = null;
this.writeable = true;
this.writable = true;
this.flags = 'w';
this.encoding = 'binary';
@ -863,7 +863,7 @@ WriteStream.prototype.flush = function () {
self.busy = false;
if (err) {
self.writeable = false;
self.writable = false;
if (cb) {
cb(err);
}
@ -902,8 +902,8 @@ WriteStream.prototype.flush = function () {
WriteStream.prototype.write = function (data) {
if (!this.writeable) {
throw new Error('stream not writeable');
if (!this.writable) {
throw new Error('stream not writable');
}
this.drainable = true;
@ -940,7 +940,7 @@ WriteStream.prototype.close = function (cb) {
WriteStream.prototype.end = function (cb) {
this.writeable = false;
this.writable = false;
this._queue.push([fs.close, cb]);
this.flush();
};
@ -959,7 +959,7 @@ WriteStream.prototype.forceClose = function (cb) {
WriteStream.prototype.destroy = function (cb) {
var self = this;
this.writeable = false;
this.writable = false;
function close() {
fs.close(self.fd, function(err) {

2
lib/net.js

@ -248,7 +248,7 @@ function allocEmptyBuffer () {
function _doFlush () {
var socket = this.socket;
// Stream becomes writeable on connect() but don't flush if there's
// Stream becomes writable on connect() but don't flush if there's
// nothing actually to write
if (socket.flush()) {
if (socket._events && socket._events['drain']) socket.emit("drain");

Loading…
Cancel
Save