-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Calling socket.end() is throwing shutdown ENOTCONN #9419
Comments
hmm... not certain. can you provide a complete test case that reliably demonstrates the problem. |
I don't seem to be able to reproduce on Windows and so far only have the stack traces in that link to go off of. That's why I'm asking for help. Can you provide me access to a non-Windows machine, please? |
Since this is going no-where fast: I have a minimal and complete test case at: mysqljs/mysql#1027 (comment) and I have to emphasize that using ssl is necessary to see the error. Only node dependency is node-mysql. Platform is OS X Yosemite (tested on two boxes) |
@CamJN thank you for the test case. Will do some digging. |
I have a similar problem when using just the When calling When I don't end the stream (using Minimal test case, requires ffmpeg, coffee-script and a test image file {createReadStream, createWriteStream} = require 'fs'
{spawn} = require 'child_process'
proc = spawn 'ffmpeg', [
# input (jpg)
'-f', 'mjpeg'
'-i', 'pipe:3'
# output (png)
'-f', 'image2'
'-c:v', 'png'
'pipe:4'
], stdio: [
'ignore' # stdin
'ignore' # stdout
'ignore' # stderr
'pipe'
'pipe'
]
proc.on 'error', (err) -> console.error "Ffmpeg error: #{err}"
proc.on 'exit', (code) -> console.log "Ffmpeg exited with code #{code}"
proc.stdio[3].on 'error', (err) -> console.error "Input error: #{err}"
proc.stdio[4].on 'error', (err) -> console.error "Output error: #{err}"
createReadStream("#{__dirname}/picture.jpg").pipe proc.stdio[3]
proc.stdio[4].pipe createWriteStream "#{__dirname}/output.png"
setTimeout ->
console.log "Node process didn't crash yet"
, 1000 Output:
Everything else works. The |
Hi Node.js, I'm having trouble with something here. In Node.js 0.12, when calling
socket.end()
, the method call itself is directly throwing the following error:Well, for one thing, I didn't realize that calling
.end()
would ever throw an error. Shouldn't the error be emitted as an event on thesocket
event emitter? I have a user reporting this at mysqljs/mysql#1027 but I don't seem to be able to reproduce on Windows (my only OS) in order to reduce the test case. That user is using OS X, so it's possible it's something OS X-specific.Any help?
The text was updated successfully, but these errors were encountered: