diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-07-20 00:20:53 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-07-20 00:20:53 +0300 |
commit | 4368ae31424f93f3272209ea61847f2406dd23ad (patch) | |
tree | 9d4c291a590abde5ab8d6dea35cd2eb9269af6de /tests/extmod/ussl_basic.py | |
parent | 46620061197e51d386c9eece6ef840d762ecad02 (diff) | |
download | micropython-4368ae31424f93f3272209ea61847f2406dd23ad.tar.gz micropython-4368ae31424f93f3272209ea61847f2406dd23ad.zip |
extmod/modussl_axtls: Allow to close ssl stream multiple times.
Make sure that 2nd close has no effect and operations on closed streams
are handled properly.
Diffstat (limited to 'tests/extmod/ussl_basic.py')
-rw-r--r-- | tests/extmod/ussl_basic.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/extmod/ussl_basic.py b/tests/extmod/ussl_basic.py index 9f8019a0bc..e8710ed51a 100644 --- a/tests/extmod/ussl_basic.py +++ b/tests/extmod/ussl_basic.py @@ -43,6 +43,14 @@ except OSError as er: # close ss.close() +# close 2nd time +ss.close() + +# read on closed socket +try: + ss.read(10) +except OSError as er: + print('read:', repr(er)) # write on closed socket try: |