Fix deprecation warning
This commit is contained in:
parent
1c60c5480f
commit
70061aee2e
|
@ -260,8 +260,7 @@ AutocompleteResponse getResponse(Socket socket)
|
|||
*/
|
||||
bool serverIsRunning(bool useTCP, string socketFile, ushort port)
|
||||
{
|
||||
scope (failure)
|
||||
return false;
|
||||
try {
|
||||
AutocompleteRequest request;
|
||||
request.kind = RequestKind.query;
|
||||
Socket socket;
|
||||
|
@ -290,6 +289,10 @@ bool serverIsRunning(bool useTCP, string socketFile, ushort port)
|
|||
return getResponse(socket).completionType == "ack";
|
||||
else
|
||||
return false;
|
||||
}
|
||||
catch (Exception _) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Escapes \n, \t and \ in the string. If `single` is true \t won't be escaped.
|
||||
|
|
Loading…
Reference in New Issue