Closed yields closed 9 years ago
is that in case of a reconnect in-progress? my initial thought is that i would want it to throw if something bad happened, or have a strategy for queuing up writes until the connection is up again
@juliangruber we're getting this noise when shutting down the process (after calling close()).
Error: 127.0.0.1:5001: write after end
at writeAfterEnd (_stream_writable.js:132:12)
at Socket.Writable.write (_stream_writable.js:180:5)
at Socket.write (net.js:615:40)
at Connection.command (/.../node_modules/nsq.js/lib/connection.js:177:8)
at Connection.finish (/.../node_modules/nsq.js/lib/connection.js:343:8)
at Message.finish (/.../node_modules/nsq.js/lib/message.js:49:13)
i might be wrong but i think the socket gets reused? so conn.end()
is never called?
ah yeah, reconnect()
never calls conn.end()
so the socket gets re-used there so i think we're good?
i think the Writer
calls conn.end()
when you call writer.close()
, so that's why we never see write after end
on reconnections.
aaaah gotcha, i thought this was ignoring writes to a closed socket but if a connection is closed i'm all +1
this should fix the
write after end
errors we are seeing.cc @gjohnson