← Back to team overview

mosquitto-users team mailing list archive

Re: Exception thrown from loop() when ssl enabled and network missing

 

Hi Jack,

Have you got an example program that reproduces this problem? I've
managed to get a similar error but wondered how you were doing it.

Cheers,

Roger

On Sun, Feb 17, 2013 at 7:38 PM, Jack O'Connor <oconnor663@xxxxxxxxx> wrote:
> Traceback (most recent call last):
>   File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
>     self.run()
>   File "/usr/lib/python3.2/threading.py", line 693, in run
>     self._target(*self._args, **self._kwargs)
>   File "/home/jacko/linuxmessenger/mosquitto.py", line 1765, in _thread_main
>     rc = self.loop()
>   File "/home/jacko/linuxmessenger/mosquitto.py", line 670, in loop
>     rc = self.loop_read(max_packets)
>   File "/home/jacko/linuxmessenger/mosquitto.py", line 840, in loop_read
>     rc = self._packet_read()
>   File "/home/jacko/linuxmessenger/mosquitto.py", line 1078, in _packet_read
>     command = self._ssl.read(1)
>   File "/usr/lib/python3.2/ssl.py", line 295, in read
>     v = self._sslobj.read(len or 1024)
> AttributeError: 'NoneType' object has no attribute 'read'
>
> It looks like _packet_read() catches certain socket exceptions, but it
> doesn't expect this one. I'm guessing this is a behavior difference between
> ssl and non-ssl sockets. Is this a bug?
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References