shut down socket before closing

This commit is contained in:
Hackerpilot 2013-07-19 00:01:42 +00:00
parent 6c69d8af49
commit f45cb5485a
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ int main(string[] args)
// Send message to server
auto socket = new TcpSocket(AddressFamily.INET);
scope (exit) socket.close();
scope (exit) { socket.shutdown(SocketShutdown.BOTH); socket.close(); }
socket.connect(new InternetAddress("127.0.0.1", port));
socket.blocking = true;
stderr.writeln("Sending ", message.length, " bytes");