jokecamp / jokecamp.com

personal blog and website
https://www.jokecamp.com
84 stars 40 forks source link

Remove unnecessary calls #18

Closed broglodyte closed 5 years ago

broglodyte commented 5 years ago

SftpClient and FileStream both implement IDisposable, so you don't need to call fs.Close() or client.Disconnect(). They're both handled by their respective Dispose() methods, which get called automatically at the end of their using blocks.

jokecamp commented 5 years ago

Thanks