[Issue 22301] New: Only use 'from' if a packet was actually received

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 13 10:58:44 UTC 2021


          Issue ID: 22301
           Summary: Only use 'from' if a packet was actually received
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: razvan.nitu1305 at gmail.com

When trying to receiveFrom a non-blocking UDP socket the program crashes.

    byte[] buf;
    buf.length = 1;
    Address addr;
    auto s = new UdpSocket;
    s.blocking = false;
    s.bind(new InternetAddress(InternetAddress.PORT_ANY));
    s.receiveFrom(buf, addr);


More information about the Digitalmars-d-bugs mailing list