MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / disconnect_socket

Function disconnect_socket

web/pgadmin/tools/psql/__init__.py:594–607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

592
593
594def disconnect_socket():
595 if _platform == 'win32':
596 if request.sid in app.config['sessions']:
597 process = app.config['sessions'][request.sid]
598 process.terminate()
599 del app.config['sessions'][request.sid]
600 cleanup_globals()
601 else:
602 os.write(app.config['sessions'][request.sid], r'\q\n'.encode())
603 sio.sleep(1)
604 os.close(app.config['sessions'][request.sid])
605 os.close(cdata[request.sid])
606 del app.config['sessions'][request.sid]
607 cleanup_globals()
608
609
610def get_connection_status(conn):

Callers 2

disconnectFunction · 0.85
server_disconnectFunction · 0.85

Calls 3

cleanup_globalsFunction · 0.85
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected