use more readable substr call

This commit is contained in:
Christian Ulrich 2020-07-06 15:25:10 +02:00
parent aa5f437093
commit f22bd5eacc
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ proc handleServerMessages(connection: ServerConnection) {.async.} =
connection.outMessages.del(args[1]) connection.outMessages.del(args[1])
future.fail(newException(ServerError, args[2])) future.fail(newException(ServerError, args[2]))
of "notify-peer": of "notify-peer":
asyncCheck connection.peerNotifications.write(&"{args[1]}|{args[2]}") asyncCheck connection.peerNotifications.write(line.substr(args[0].len + 1))
else: else:
raise newException(ValueError, "invalid server message") raise newException(ValueError, "invalid server message")