Skip to content

Commit f6a5b08

Browse files
committed
Merge pull request #476 from arktisklada/auto-restart-when-version-mismatch
Auto-restart server when version mismatch
2 parents a98bb92 + e3cd7e4 commit f6a5b08

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.6.5
2+
3+
* Auto-restart server when server and client versions do not match
4+
15
## 1.6.4
26

37
* Fix incompatibility with RubyGems 2.6.0.

lib/spring/client/run.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ def verify_server_version
9898
server_version = server.gets.chomp
9999
if server_version != env.version
100100
$stderr.puts <<-ERROR
101-
There is a version mismatch between the spring client and the server.
102-
You should restart the server and make sure to use the same version.
103-
104-
CLIENT: #{env.version}, SERVER: #{server_version}
101+
There is a version mismatch between the spring client (#{env.version}) and the server (#{server_version}).
102+
Restarting to resolve.
105103
ERROR
106-
exit 1
104+
105+
stop_server
106+
cold_run
107107
end
108108
end
109109

0 commit comments

Comments
 (0)