projects
/
oweals
/
nmrpflash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74ab06f
)
Gracefully close the socket
author
Joseph C. Lehner
<joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 12:16:49 +0000
(14:16 +0200)
committer
Joseph C. Lehner
<joseph.c.lehner@gmail.com>
Fri, 5 Feb 2016 12:22:56 +0000
(14:22 +0200)
tftp.c
patch
|
blob
|
history
diff --git
a/tftp.c
b/tftp.c
index 5a09aa2dbdcd89d5101763fa57a71d357d840d78..80efff0c090839d532c23f35071bce467709c7e8 100644
(file)
--- a/
tftp.c
+++ b/
tftp.c
@@
-314,7
+314,12
@@
cleanup:
}
if (sock >= 0) {
+ shutdown(sock, SHUT_RDWR);
+#ifndef NMRPFLASH_WINDOWS
close(sock);
+#else
+ closesocket(sock);
+#endif
}
return err;