summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/logging/handlers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 2cb1fb0..559404f 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -450,6 +450,8 @@ class DatagramHandler(SocketHandler):
when the network is busy - UDP does not guarantee delivery and
can deliver packets out of sequence.
"""
+ if self.sock is None:
+ self.createSocket()
self.sock.sendto(s, (self.host, self.port))
class SysLogHandler(logging.Handler):