Method: Appium::Core::WebSocket#close
- Defined in:
- lib/appium_lib_core/common/ws/websocket.rb
#close(code: nil, reason: 'close from ruby_lib_core') ⇒ Object
Closes the connection, sending the given status code and reason text, both of which are optional.
106 107 108 109 110 111 112 113 |
# File 'lib/appium_lib_core/common/ws/websocket.rb', line 106 def close(code: nil, reason: 'close from ruby_lib_core') if @client.nil? ::Appium::Logger.warn 'Websocket was closed' else @client.close code, reason end @ws_thread.exit end |