mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00187
Re: Exception thrown from loop() when ssl enabled and network missing
Hi Jack,
Thanks for the message, I agree that it looks like you've found some
problems. It's been a bit busy here and I've not been getting much
sleep so I've not looked at it properly yet, but I just wanted to make
sure you didn't think I was ignoring you.
Thanks,
Roger
On Sun, Feb 17, 2013 at 7:49 PM, Jack O'Connor <oconnor663@xxxxxxxxx> wrote:
> This might be another place where we intend to catch exceptions, but the
> exception type is different when ssl is on:
>
> 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 664, in loop
> socklist = select.select(rlist, wlist, [], timeout)
> ValueError: file descriptor cannot be a negative integer (-1)
>
>
>
> On Sun, Feb 17, 2013 at 11:38 AM, 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
>
References