glejeune / node-graphviz

Node.js interface to the GraphViz graphing tool
http://algorithmique.net
MIT License
197 stars 58 forks source link

close temp file in write callback #22

Closed michalgm closed 5 years ago

michalgm commented 9 years ago

I was having an issue where, when generating many graphs, I was getting fs errors. Moving the close and parse into the write callback seems to have made the errors go away. I assume there was a race condition where the file was sometimes being closed before the write was complete.