File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -701,6 +701,11 @@ def killServer():
701701 Kills the tika server started by the current execution instance
702702 '''
703703 if (TikaServerProcess ):
704+ try :
705+ os .killpg (os .getpgid (TikaServerProcess .pid ), signal .SIGTERM )
706+ except :
707+ log .error ("Failed to kill the current server session" )
708+ time .sleep (1 )
704709 # patch to support subprocess killing for windows
705710 if Windows :
706711 if sys .version .startswith ("2" ):
@@ -715,7 +720,10 @@ def killServer():
715720 os .kill (TikaServerProcess .pid , signal .SIGTERM )
716721 time .sleep (1 )
717722 else :
718- os .killpg (os .getpgid (TikaServerProcess .pid ), signal .SIGTERM )
723+ try :
724+ os .killpg (os .getpgid (TikaServerProcess .pid ), signal .SIGTERM )
725+ except :
726+ log .error ("Failed to kill the current server session" )
719727 time .sleep (1 )
720728 else :
721729 log .error ("Server not running, or was already running before" )
You can’t perform that action at this time.
0 commit comments