Skip to content

Commit 615f4ae

Browse files
authored
Fix problem with infinite running python-cli (#2233)
1 parent 46fcd2a commit 615f4ae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

utbot-python/src/main/kotlin/org/utbot/python/evaluation/PythonCoverageReceiver.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class PythonCoverageReceiver(
1717
return "localhost" to socket.localPort.toString()
1818
}
1919

20+
fun kill() {
21+
socket.close()
22+
this.interrupt()
23+
}
24+
2025
override fun run() {
2126
try {
2227
while (System.currentTimeMillis() < until) {

utbot-python/src/main/kotlin/org/utbot/python/evaluation/PythonWorkerManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class PythonWorkerManager(
6565
fun disconnect() {
6666
workerSocket.close()
6767
process.destroy()
68-
coverageReceiver.interrupt()
68+
coverageReceiver.kill()
6969
}
7070

7171
fun reconnect() {

0 commit comments

Comments
 (0)