Can writing to a UDP socket ever block?

后端 未结 2 1192
天命终不由人
天命终不由人 2021-02-19 07:04

And if so, under what conditions? Or, phrased alternately, is it safe to run this code inside of twisted:

class StatsdClient(AbstractStatsdClient):
  def __init_         


        
2条回答
  •  梦如初夏
    2021-02-19 07:45

    It could fail if your network interface goes down, for example:

    [ENETDOWN] The local network interface used to reach the destination is down.

提交回复
热议问题