Skip to content

Commit

Permalink
writeable -> writable
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 29, 2010
1 parent 55c65cc commit f323f34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/fs.js
Expand Up @@ -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';
Expand Down Expand Up @@ -863,7 +863,7 @@ WriteStream.prototype.flush = function () {
self.busy = false;

if (err) {
self.writeable = false;
self.writable = false;
if (cb) {
cb(err);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
};
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/net.js
Expand Up @@ -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");
Expand Down

0 comments on commit f323f34

Please sign in to comment.