← index #716Issue #4484
Related · medium · value 3.642
QUERY · ISSUE

MQTT Disconnect socket write then close

openby AngeloFaticaopened 2023-08-16updated 2023-08-16

When there are network issues and I want to disconnect from mqtt client, the socket writes are blocking and cannot be changed (I havent been successful) so it will just hang on the self.sock.write(b"\xe0\0") line in the disconnect function of simple.py. Is this a necessary action, or can I not write that byte array and just close the socket so that I do not have to worry about hanging on the write indefinitely?

CANDIDATE · ISSUE

module wiznet5k server not disconnecting prior to close

openby t35tB0topened 2019-02-10updated 2019-02-22
port-stm32

When wiznet5K TCP sockets are being used as servers, client connections hang due to server closing socket without issuing proper FIN-ACK disconnect. Adding disconnect in the close() method fixes client handshake but breaks the socket del destructor method (system hangs, waits a long time for timeouts). The wiznet 5K socket disconnect method closes the socket but this command is never called (code pragma'd out).

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied