the Session is not closed so there is a STREAM (SocketKind.SOCK_STREAM) opened until the Python application finishes.
By using the with statement, we ensure that even if an unhandled exception is thrown the socket will be always closed (see: Advanced Usage - Session Objects)
By using just:
the
Session
is not closed so there is aSTREAM
(SocketKind.SOCK_STREAM
) opened until the Python application finishes.By using the
with
statement, we ensure that even if an unhandled exception is thrown the socket will be always closed (see: Advanced Usage - Session Objects)