Handle one more onReadable call from crypto

MUST get rid of this calledByIOWatcher stuff. Hopefully will be able to when
securepair stuff lands.
This commit is contained in:
Ryan Dahl 2010-10-28 12:34:46 -07:00
Родитель 73cfda12bb
Коммит 65dced730f
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -168,7 +168,7 @@ function setImplmentationMethods (self) {
if (secureLen == -1) {
// Check our read again for secure handshake
self._readWatcher.callback();
self._onReadable();
} else {
oldWrite(securePool, 0, secureLen, fd, flags);
}
@ -215,7 +215,7 @@ function setImplmentationMethods (self) {
if (self.secureStream.clearPending()) {
process.nextTick(function () {
if (self.readable) self._onReadable(true);
if (self.readable) self._onReadable();
});
}
@ -275,7 +275,7 @@ function setImplmentationMethods (self) {
function onReadable (readable, writeable) {
assert(this.socket);
var socket = this.socket;
socket._onReadable();
socket._onReadable(true);
}
@ -704,7 +704,7 @@ Stream.prototype._onWritable = function () {
};
Stream.prototype._onReadable = function () {
Stream.prototype._onReadable = function (calledByIOWatcher) {
var self = this;
// If this is the first recv (pool doesn't exist) or we've used up
@ -723,7 +723,7 @@ Stream.prototype._onReadable = function () {
bytesRead = self._readImpl(pool,
pool.used,
pool.length - pool.used,
!arguments[0] /* stupid calledByIOWatcher shit */);
calledByIOWatcher);
} catch (e) {
self.destroy(e);
return;