Compare commits

...

4 Commits

Author SHA1 Message Date
s2
d42aa109e7 close socket only if it exists 2019-01-23 18:06:06 +01:00
SSantoro
407e8ee6bc Revert "send mode reader before doing anything"
This reverts commit d15f51f1ce.
2018-10-15 17:25:08 +02:00
SSantoro
d15f51f1ce send mode reader before doing anything 2018-10-12 12:34:48 +02:00
SSantoro
4089c7bf55 add face header option 2018-05-09 15:31:07 +02:00

View File

@@ -178,7 +178,10 @@ NNTP.prototype.connect = function(options) {
// many? servers don't support the *mandatory* CAPABILITIES command :-(
if (err && cmd !== 'CAPABILITIES') {
self.emit('error', err);
return self._socket.end();
if (self._socket) {
self._socket.end()
}
return;
}
// TODO: try sending CAPABILITIES first thing
if (!cmd) {
@@ -650,6 +653,12 @@ NNTP.prototype.post = function(msg, cb) {
text += CRLF;
}
if (msg.face) {
text += 'Face: ';
text += msg.face;
text += CRLF;
}
text += 'Content-Type: text/plain; charset=utf-8';
text += CRLF;