Fix warning misfire about broken sessions

This commit is contained in:
Tim Pope 2014-01-07 22:15:49 -05:00
parent c7258fce7c
commit 280b8d09b5
1 changed files with 4 additions and 4 deletions

View File

@ -71,12 +71,12 @@ function! nrepl#fireplace_connection#open(arg) abort
let client = deepcopy(s:nrepl) let client = deepcopy(s:nrepl)
let client.host = host let client.host = host
let client.port = port let client.port = port
let session = client.process({'op': 'clone', 'session': 0})['new-session'] let client.session = client.process({'op': 'clone', 'session': 0})['new-session']
let response = client.process({'op': 'eval', 'session': session, 'code': let response = client.process({'op': 'eval', 'code':
\ '(do (println "success") (symbol (str (System/getProperty "path.separator") (System/getProperty "java.class.path"))))'}) \ '(do (println "success") (symbol (str (System/getProperty "path.separator") (System/getProperty "java.class.path"))))'})
let client._path = response.value[-1] let client._path = response.value[-1]
if has_key(response, 'out') if !has_key(response, 'out')
let client.session = session unlet client.session
endif endif
return client return client
endfunction endfunction