shut down socket before closing
This commit is contained in:
parent
6c69d8af49
commit
f45cb5485a
2
client.d
2
client.d
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue