Skip to content

Instantly share code, notes, and snippets.

@HoverBaum
Last active April 12, 2016 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoverBaum/a09316e554fd66add90d7f2ce86d8af0 to your computer and use it in GitHub Desktop.
Save HoverBaum/a09316e554fd66add90d7f2ce86d8af0 to your computer and use it in GitHub Desktop.
The active handles after trying to close a http server that uses puer connect middleware
[
WriteStream {
_connecting: false,
_hadError: false,
_handle: TTY {
_externalStream: {},
fd: -1,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread]
},
_parent: null,
_host: null,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null
},
readable: false,
domain: null,
_events: {
end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd]
},
_eventsCount: 3,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 85,
rows: 40,
_type: 'tty',
fd: 2,
_isStdio: true,
destroySoon: [Function],
destroy: [Function]
},
WriteStream {
_connecting: false,
_hadError: false,
_handle: TTY {
_externalStream: {},
fd: -1,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread]
},
_parent: null,
_host: null,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null
},
readable: false,
domain: null,
_events: {
end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd]
},
_eventsCount: 3,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 2,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 196,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 85,
rows: 40,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function]
},
Server {
domain: null,
_events: {
connection: [Function: connectionListener],
clientError: [Function],
error: [Function],
request: [Function],
upgrade: [Function],
close: [Object]
},
_eventsCount: 6,
_maxListeners: undefined,
_connections: 0,
_handle: null,
_usingSlaves: false,
_slaves: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
timeout: 120000,
_pendingResponseData: 0,
_connectionKey: '6::::8001'
},
Timer {
'0': [Function: listOnTimeout],
_list: TimersList {
_idleNext: [Circular],
_idlePrev: [Circular],
_timer: [Circular],
_unrefed: false,
msecs: 5000
}
},
//Everything from here on exist due to puer connect middleware
Timer {
'0': [Function: listOnTimeout],
_list: TimersList {
_idleNext: [Circular],
_idlePrev: [Circular],
_timer: [Circular],
_unrefed: false,
msecs: 10000
}
},
//One FSWatcher for each file (index.html test.js server.js .gitignore)
//readme.md was created after saving this output.
//Try adding more files and there will be more FSWatchers
FSWatcher {
domain: null,
_events: {
change: [Function]
},
_eventsCount: 1,
_maxListeners: undefined,
_handle: FSEvent {
owner: [Circular],
onchange: [Function]
}
},
FSWatcher {
domain: null,
_events: {
change: [Function]
},
_eventsCount: 1,
_maxListeners: undefined,
_handle: FSEvent {
owner: [Circular],
onchange: [Function]
}
},
FSWatcher {
domain: null,
_events: {
change: [Function]
},
_eventsCount: 1,
_maxListeners: undefined,
_handle: FSEvent {
owner: [Circular],
onchange: [Function]
}
},
FSWatcher {
domain: null,
_events: {
change: [Function]
},
_eventsCount: 1,
_maxListeners: undefined,
_handle: FSEvent {
owner: [Circular],
onchange: [Function]
}
}
]
[
WriteStream {
_connecting: false,
_hadError: false,
_handle: TTY {
_externalStream: {},
fd: -1,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread]
},
_parent: null,
_host: null,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null
},
readable: false,
domain: null,
_events: {
end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd]
},
_eventsCount: 3,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 85,
rows: 40,
_type: 'tty',
fd: 2,
_isStdio: true,
destroySoon: [Function],
destroy: [Function]
},
Server {
domain: null,
_events: {
request: [Object],
connection: [Function: connectionListener],
clientError: [Function]
},
_eventsCount: 3,
_maxListeners: undefined,
_connections: 0,
_handle: null,
_usingSlaves: false,
_slaves: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
timeout: 120000,
_pendingResponseData: 0,
_connectionKey: '6::::8001'
},
Timer {
'0': [Function: listOnTimeout],
_list: TimersList {
_idleNext: [Circular],
_idlePrev: [Circular],
_timer: [Circular],
_unrefed: false,
msecs: 5000
}
},
WriteStream {
_connecting: false,
_hadError: false,
_handle: TTY {
_externalStream: {},
fd: -1,
writeQueueSize: 0,
owner: [Circular],
onread: [Function: onread]
},
_parent: null,
_host: null,
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null
},
readable: false,
domain: null,
_events: {
end: [Object],
finish: [Function: onSocketFinish],
_socketEnd: [Function: onSocketEnd]
},
_eventsCount: 3,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: false,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 2,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
allowHalfOpen: false,
destroyed: false,
bytesRead: 0,
_bytesDispatched: 97,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 85,
rows: 40,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment