Compare commits

...

4 Commits

Author SHA1 Message Date
s2
361ff18212 close socket only if it exists 2019-01-29 09:33:57 +01:00
s2
d0db95715b Revert "send mode reader before doing anything"
This reverts commit d15f51f1ce.
2019-01-29 09:33:45 +01:00
s2
512ca14054 send mode reader before doing anything 2019-01-29 09:33:36 +01:00
s2
f963a7cbb3 add face header option 2019-01-29 09:33:25 +01: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;