Skip to content

Commit ae6cfc3

Browse files
cameronrsudo-tee
authored andcommitted
fix(server_job): don't call shutdown in on_exit
The work down in opencode_server.shutdown is already done by the on_exit handler in opencode_server.spawn. Calling it again via state.opencode_Server_job is likely to shutdown a newly spawned replacement server
1 parent f53fc0d commit ae6cfc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/opencode/server_job.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function M.ensure_server()
164164
promise:reject(err)
165165
end,
166166
on_exit = function(exit_opts)
167-
state.opencode_server_job:shutdown()
167+
promise:reject('Server exited')
168168
end,
169169
})
170170

0 commit comments

Comments
 (0)