mirror of
https://gitlab1.ptb.de/waltem01/csharpsocketserver
synced 2024-02-04 23:19:43 +00:00
close on listen bugfix
This commit is contained in:
parent
98e34ab248
commit
8f2bb3a4e8
|
@ -114,8 +114,10 @@ public static class Connection {
|
|||
Socket other = own.EndAccept(AR);
|
||||
listeners--;
|
||||
other.BeginReceive(buffer, 0, buffer.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), other);
|
||||
if (self == null)
|
||||
if (self == null) {
|
||||
self = other;
|
||||
own.Close();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle sending messages
|
||||
|
|
Loading…
Reference in New Issue
Block a user